Fix spacebars-tests

The "inclusion args" tests broke with commit
1c37ac1a98. Within
'lookup' we were wrapping results in functions
even when they were constants. This led
`{{> foo bar}}` to not correctly pass `bar`
as data into the Template pointed to by `foo`.
This commit is contained in:
Avital Oliver
2013-10-22 22:02:47 -07:00
parent a0f76c8c74
commit 4788427f9d

View File

@@ -89,11 +89,12 @@ _extend(UI.Component, {
};
}
return function (/*arguments*/) {
if (typeof result === 'function') {
if (typeof result === 'function') {
return function (/*arguments*/) {
var data = getComponentData(self);
return result.apply(data, arguments);
}
};
} else {
return result;
};
},