Use objects for hash value tracking

The use of arrays was incorrect for the data type and causing problems when hash keys conflicted with array behaviors.

Fixes #1194

(cherry picked from commit 768ddbd661)
This commit is contained in:
kpdecker
2016-03-12 05:16:18 +01:00
committed by Nils Knappmeier
parent a15d01d383
commit 2ef6fbd1fc
2 changed files with 12 additions and 1 deletions
+11
View File
@@ -323,4 +323,15 @@ describe('Regressions', function() {
}, 'useData': true});
}
});
it('should allow hash with protected array names', function() {
var obj = {array: [1], name: 'John'};
var helpers = {
helpa: function(options) {
return options.hash.length;
}
};
shouldCompileTo('{{helpa length="foo"}}', [obj, helpers], 'foo');
});
});