Thank you for reporting this bug. We will make it our priority to review this report.
ObjectTemplate applies empty object to null values in template
ObjectTemplate applies empty object to null values in template
ObjectTemplate does not handle null values in a template object correctly. It applied an empty object '{}' to null values.
For example, see this Fiddle: http://ift.tt/1CAqx7a
- Press play -> error
- Uncomment line 30 (resets applied.controller to null)
- Press play -> renders
Check the logged object in the browser console: the controller property should be null but is an objectAdditional info
Ext version tested:
- Ext JS 5.1.0.107 Crisp
- Ext JS 5.0.0.970 Crisp
- Ext JS Nightly build of 2015-02-15
Browser versions tested against:Fix?
To temporarily fix this, i've created a bugfix override for ObjectTemplate, copied the privates config with compile function from the original, and added a template === null check at line 126:Code:
} else if (template === null || Ext.isPrimitive(template) || Ext.isFunction(template)) {
fn = function() {
return template;
};
} ...
Original code: http://ift.tt/1CAqx7e
ObjectTemplate applies empty object to null values in template
Aucun commentaire:
Enregistrer un commentaire