Igor 2 years ago
parent
commit
af1e0193ea
1 changed files with 4 additions and 0 deletions
  1. 4 0
      js/util/utils.js

+ 4 - 0
js/util/utils.js

@@ -194,10 +194,14 @@ export function isKeyword (text) {
 
 export function isValidIdentifier (identifier_str) {
   const validRegex = /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(identifier_str);
+<<<<<<< HEAD
   if (!validRegex) {
     return false;
   }
   return !isKeyword(identifier_str);
+=======
+  return validRegex && !isKeyword(identifier_str)
+>>>>>>> 6c7838ce80a547899aaa9e4248f41136f41da1e2
 }
 
 export function getCodeEditorModeConfig () {