summaryrefslogtreecommitdiff
path: root/js/lib/node.js
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-01-13 22:51:51 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-01-13 22:54:21 -0800
commit9fbc6267a4f6cd87c92fa6f57f437aacbac4fb72 (patch)
treedd80aa7af9614a75869102710022e8f7d2562b0a /js/lib/node.js
parentdaf49a0089b9f5e342d3f6ee077d7e284eeb5c1c (diff)
Initialize fields in objects to null rather than undefined.
Big speed boost.
Diffstat (limited to 'js/lib/node.js')
-rw-r--r--js/lib/node.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/js/lib/node.js b/js/lib/node.js
index e58c7c7..c90c3e9 100644
--- a/js/lib/node.js
+++ b/js/lib/node.js
@@ -72,17 +72,17 @@ var Node = function(nodeType, sourcepos) {
this.sourcepos = sourcepos;
this.last_line_blank = false;
this.open = true;
- this.strings = undefined;
- this.string_content = undefined;
- this.literal = undefined;
- this.list_data = undefined;
- this.info = undefined;
- this.destination = undefined;
- this.title = undefined;
- this.fence_char = undefined;
- this.fence_length = undefined;
- this.fence_offset = undefined;
- this.level = undefined;
+ this.strings = null;
+ this.string_content = null;
+ this.literal = null;
+ this.list_data = null;
+ this.info = null;
+ this.destination = null;
+ this.title = null;
+ this.fence_char = null;
+ this.fence_length = null;
+ this.fence_offset = null;
+ this.level = null;
};
Node.prototype.isContainer = function() {