Fixed missing var in compiler code causing compilerWords to be global.

This commit is contained in:
Alan Johnson
2011-08-15 23:10:27 -04:00
parent 2f7b724d5a
commit 3c5cac3f3f
+1 -1
View File
@@ -727,7 +727,7 @@ Handlebars.JavaScriptCompiler = function() {};
"for function if in instanceof new return switch this throw " +
"try typeof var void while with null true false").split(" ");
compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
for(var i=0, l=reservedWords.length; i<l; i++) {
compilerWords[reservedWords[i]] = true;