From 1d721aba43c4f2f74c80da53bd4196c03a73f48b Mon Sep 17 00:00:00 2001 From: David Greenspan Date: Fri, 4 Oct 2013 20:09:04 -0700 Subject: [PATCH] more comments --- packages/spacebars/spacebars.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/spacebars/spacebars.js b/packages/spacebars/spacebars.js index cc3cbd77f0..0230ff249e 100644 --- a/packages/spacebars/spacebars.js +++ b/packages/spacebars/spacebars.js @@ -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]; });