Explorar o código

HUE-9084 [frontend] Fix parser test utils exception when there are no keywords

Johan Ahlen %!s(int64=6) %!d(string=hai) anos
pai
achega
3248571896
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      desktop/core/src/desktop/js/jest/sqlTestUtils.js

+ 1 - 1
desktop/core/src/desktop/js/jest/sqlTestUtils.js

@@ -230,7 +230,7 @@ expect.extend({
       deleteKeywords = true;
     }
     if (typeof testDefinition.doesNotContainKeywords !== 'undefined') {
-      const keywords = actualResponse.suggestKeywords;
+      const keywords = actualResponse.suggestKeywords || [];
       let contains = false;
       testDefinition.doesNotContainKeywords.forEach(keyword => {
         if (typeof keywords === 'undefined' || keywords.indexOf(keyword) !== -1) {