瀏覽代碼

HUE-9247 [editor] Fix issue where the location webworker throws exception for non-active statements

Johan Ahlen 5 年之前
父節點
當前提交
f2637c4741
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      desktop/core/src/desktop/js/sql/sqlLocationWebWorker.js

+ 2 - 2
desktop/core/src/desktop/js/sql/sqlLocationWebWorker.js

@@ -60,7 +60,7 @@ const onMessage = msg => {
         let locations = [];
         let locations = [];
         const activeStatementLocations = [];
         const activeStatementLocations = [];
         msg.data.statementDetails.precedingStatements.forEach(statement => {
         msg.data.statementDetails.precedingStatements.forEach(statement => {
-          handleStatement(statement, locations, msg.data.type, false);
+          handleStatement(statement, locations, parser, false);
         });
         });
         if (msg.data.statementDetails.activeStatement) {
         if (msg.data.statementDetails.activeStatement) {
           handleStatement(
           handleStatement(
@@ -72,7 +72,7 @@ const onMessage = msg => {
           locations = locations.concat(activeStatementLocations);
           locations = locations.concat(activeStatementLocations);
         }
         }
         msg.data.statementDetails.followingStatements.forEach(statement => {
         msg.data.statementDetails.followingStatements.forEach(statement => {
-          handleStatement(statement, locations, msg.data.type, false);
+          handleStatement(statement, locations, parser, false);
         });
         });
 
 
         // Add databases where missing in the table identifier chains
         // Add databases where missing in the table identifier chains