Closed
Description
When Velocity is used with Ember's liquid-fire, due to prototype containing getters, CSS.Hooks.registered receive lots keys whose names contain Ember's getter funtcion definition
So it's better to add hasOwnProperty check:
/* Hook registration. */
for (rootProperty in CSS.Hooks.templates) {
hookTemplate = CSS.Hooks.templates[rootProperty];
hookNames = hookTemplate[0].split(" ");
for (var i in hookNames) {
if(!hookNames.hasOwnProperty(i)){
break;
}
var fullHookName = rootProperty + hookNames[i],
hookPosition = i;
/* For each hook, register its full name (e.g. textShadowBlur) with its root property (e.g. textShadow)
and the hook's position in its template's default value string. */
CSS.Hooks.registered[fullHookName] = [ rootProperty, hookPosition ];
}
}
Metadata
Metadata
Assignees
Labels
No labels
Activity