Skip to content
Snippets Groups Projects
Commit 6c0cd2b5 authored by Richard van der Meer's avatar Richard van der Meer Committed by Marijn Haverbeke
Browse files

[vbscript mode] Fixed "Cannot read property 'substr' of null"

Error occurs when entering multiple dots
parent 238b4513
No related branches found
No related tags found
No related merge requests found
......@@ -291,7 +291,7 @@ CodeMirror.defineMode("vbscript", function(conf, parserConf) {
style = state.tokenize(stream, state);
current = stream.current();
if (style.substr(0, 8) === 'variable' || style==='builtin' || style==='keyword'){//|| knownWords.indexOf(current.substring(1)) > -1) {
if (style && (style.substr(0, 8) === 'variable' || style==='builtin' || style==='keyword')){//|| knownWords.indexOf(current.substring(1)) > -1) {
if (style === 'builtin' || style === 'keyword') style='variable';
if (knownWords.indexOf(current.substr(1)) > -1) style='variable-2';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment