Permalink
Browse files

Range check node attributes. Fixes #64

  • Loading branch information...
1 parent 115897e commit 455199a482eda82cdc3f57f960268ca149c073e9 @azakus azakus committed May 3, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 enyo.js
View
@@ -24,7 +24,7 @@
// infer the framework path from the document, unless the user has specified one explicitly
enyo.args.root = (enyo.args.root || tag.path); /*.replace("/source", "")*/;
// all attributes of the bootstrap script tag become enyo.args
- for (var i=0, it; (it = tag.node.attributes.item(i)); i++) {
+ for (var i=0, al = tag.node.attributes.length, it; (i < al) && (it = tag.node.attributes.item(i)); i++) {
enyo.args[it.nodeName] = it.value;
}
}
@@ -38,4 +38,4 @@
script("../../loader.js");
script("boot.js");
script("../package.js");
-})();
+})();

0 comments on commit 455199a

Please sign in to comment.