浏览代码

HUE-7648 [editor] Only mark missing identifiers when there are suggestions

Johan Ahlen 8 年之前
父节点
当前提交
1406843cae
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

+ 1 - 1
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -3907,7 +3907,7 @@
               })
             }
 
-            if (token.parseLocation) {
+            if (token.parseLocation && weightedExpected.length > 0) {
               var AceRange = ace.require('ace/range').Range;
               var range = new AceRange(token.parseLocation.location.first_line - 1, token.parseLocation.location.first_column - 1, token.parseLocation.location.last_line - 1, token.parseLocation.location.last_column - 1);
               self.addAnchoredMarker(range,  token, 'hue-ace-syntax-warning');