Skip to content

Commit 107d97b

Browse files
committed
backport: (parser) use null prototype objects for languages/aliases (#2636)
1 parent d72f081 commit 107d97b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/highlight.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ https://highlightjs.org/
3333
objectKeys = Object.keys;
3434

3535
// Global internal variables used within the highlight.js library.
36-
var languages = {},
37-
aliases = {};
36+
var languages = Object.create(null),
37+
aliases = Object.create(null);
3838

3939
// safe/production mode - swallows more errors, tries to keep running
4040
// even if a single syntax or parse hits a fatal error

0 commit comments

Comments
 (0)