Browse Source

fix: Remove comment from isValidIdentifier

Lucas de Souza 2 years ago
parent
commit
6c7838ce80
1 changed files with 1 additions and 5 deletions
  1. 1 5
      js/util/utils.js

+ 1 - 5
js/util/utils.js

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