Преглед изворни кода

HUE-4253 [editor] Prompt for variables just once per variable name

Enrico Berti пре 9 година
родитељ
комит
203e2a1183
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

+ 3 - 1
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -379,7 +379,9 @@
 
       var match, matches = [];
       while (match = re.exec(self.statement_raw())) {
-        matches.push(match[1]);
+        if (matches.indexOf(match[1]) == -1) {
+          matches.push(match[1]);
+        }
       }
       return matches;
     });