I have a doubt regarding the behaviour of {{#with .....}}
I thought it will check if the value existed but in my case it seems to fail, take a look a this example:
// this is the original code that sometimes fails (depending on the data - no checks)
<my-input-text-component currentData:bind="current.myObject.myProperty" />
// this works
{{#if current.myObject}}
<my-input-text-component currentData:bind="current.myObject.myProperty" />
{{/if}}
But the think is that I would have expected this to work as well but didn't:
// this is what I thought should work (simple)
{{#with current}}
{{#with myObject}}
<my-input-text-component currentData:bind="myProperty" />
{{/with}}
{{/with}}
Is this an intended behaviour? or is it a bug?
Thanks
myObject
is undefined (cannot get property myProperty
of undefined)
{{#current}}
{{#myObject}}
<my-input-text-component currentData:bind="myProperty" />
{{/myObject}}
{{/current}}
{{#myObject}}
to {{#with myObject}}
because it was not working ok. If that was really a bug and is now fixed then that code should work. I don’t have the failing code at hand but I’ll let you know if it worked