Browse Source

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

Johan Ahlen 8 years ago
parent
commit
1406843cae
1 changed files with 1 additions and 1 deletions
  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 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);
               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');
               self.addAnchoredMarker(range,  token, 'hue-ace-syntax-warning');