The below block of code in the inline hook causes issues when a false-like value is returned.
If morph.lastValue is hello and you want to update the value to a blank value (e.g. null or '') the check result && result.value stops the value from actually being updated.
if (result && result.value) {
var value = result.value;
if (morph.lastValue !== value) {
morph.setContent(value);
}
morph.lastValue = value;
}
In the new Ember {{get}} keyword there is a particular workaround in place to compensate for this issue.
The below block of code in the inline hook causes issues when a false-like value is returned.
If
morph.lastValue
ishello
and you want to update the value to a blank value (e.g. null or '') the checkresult && result.value
stops the value from actually being updated.In the new Ember {{get}} keyword there is a particular workaround in place to compensate for this issue.