Skip to content

Commit 5866b23

Browse files
author
Brian Vaughn
authored
Merge pull request #73 from davidlukerice/patch-1
Don't inherit from the default Object for the token dictionary
2 parents 6404546 + 27c2be0 commit 5866b23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/TokenHighlighter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class TokenHighlighter {
4040
highlight(text : string, tokens : Array<string>) {
4141
var tagsLength : number = this._wrapText('').length;
4242

43-
var tokenDictionary = {};
43+
var tokenDictionary = Object.create(null);
4444

4545
// Create a token map for easier lookup below.
4646
for (var i = 0, numTokens = tokens.length; i < numTokens; i++) {

0 commit comments

Comments
 (0)