mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
more comments
This commit is contained in:
@@ -945,12 +945,11 @@ Spacebars.index = function (value/*, identifiers*/) {
|
||||
if (typeof value === 'function') {
|
||||
// Call a getter -- in `{{foo.bar}}`, call `foo()` if it
|
||||
// is a function before indexing it with `bar`.
|
||||
//
|
||||
// In `{{foo blah=FooComponent.Bar}}`, treat
|
||||
// `FooComponent` as a non-function.
|
||||
value = value.call(nextThis);
|
||||
}
|
||||
nextThis = value;
|
||||
// support "soft dot" where if `foo` doesn't exist, you can
|
||||
// still do `{{foo.bar.baz}}`.
|
||||
if (value)
|
||||
value = value[id];
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user