diff options
author | James Fuller <jblotus@gmail.com> | 2011-05-24 00:40:09 -0400 |
---|---|---|
committer | James Fuller <jblotus@gmail.com> | 2011-05-24 00:40:09 -0400 |
commit | 28d35180bd4464fc1b3747339148f399559c512e (patch) | |
tree | b5e1fa98505d8ce01083102b155a63cc8d3a3584 /lib/handlebars/compiler.js | |
parent | 0e22301e8fadf219572bbc6679b3d99b2c67d136 (diff) | |
download | handlebars.js-28d35180bd4464fc1b3747339148f399559c512e.zip handlebars.js-28d35180bd4464fc1b3747339148f399559c512e.tar.gz handlebars.js-28d35180bd4464fc1b3747339148f399559c512e.tar.bz2 |
fixing partials with int names
Diffstat (limited to 'lib/handlebars/compiler.js')
-rw-r--r-- | lib/handlebars/compiler.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/handlebars/compiler.js b/lib/handlebars/compiler.js index 3e71de3..9daa3df 100644 --- a/lib/handlebars/compiler.js +++ b/lib/handlebars/compiler.js @@ -288,7 +288,7 @@ Handlebars.JavaScriptCompiler = function() {}; // PUBLIC API: You can override these methods in a subclass to provide // alternative compiled forms for name lookup and buffering semantics nameLookup: function(parent, name, type) { - if(JavaScriptCompiler.RESERVED_WORDS[name] || name.indexOf('-') !== -1) { + if(JavaScriptCompiler.RESERVED_WORDS[name] || name.indexOf('-') !== -1 || !isNaN(name)) { return parent + "['" + name + "']"; } else { return parent + "." + name; |