Skip to content

Commit 36f1348

Browse files
authored
[sTeX mode] Ensured that tag does not clash with object prototype properties
1 parent 2f51b60 commit 36f1348

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mode/stex/stex.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
// Do we look like '\command' ? If so, attempt to apply the plugin 'command'
104104
if (source.match(/^\\[a-zA-Z@]+/)) {
105105
var cmdName = source.current().slice(1);
106-
plug = plugins[cmdName] || plugins["DEFAULT"];
106+
plug = plugins.hasOwnProperty(cmdName) ? plugins[cmdName] : plugins["DEFAULT"];
107107
plug = new plug();
108108
pushCommand(state, plug);
109109
setState(state, beginParams);

0 commit comments

Comments
 (0)