aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-01-09 22:23:02 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-01-09 23:17:00 -0800
commit977a9dd1cd0e5574799211d697b0889431fc0876 (patch)
tree6a15bb8ec827ecc49373bf95df51186a9708a35a
parentec48b49edb041b8a42d3f35c8738f869cec9dc49 (diff)
Small optimization.
-rw-r--r--js/lib/node.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/lib/node.js b/js/lib/node.js
index 6c15761..89172d7 100644
--- a/js/lib/node.js
+++ b/js/lib/node.js
@@ -167,7 +167,7 @@ var toASTNode = function(node) {
var propsToShow = ['t', 'literal', 'list_data', 'sourcepos',
'info', 'level'];
- for (var i = 0; i < propsToShow.length; i++) {
+ for (var i = 0, len = propsToShow.length; i < len; i++) {
var prop = propsToShow[i];
if (node[prop] !== undefined) {
result[prop] = node[prop];