Selaa lähdekoodia

fix: `window` is not defined

Ahmad Kholid 2 vuotta sitten
vanhempi
commit
07fd3bbd7f
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      src/workflowEngine/WorkflowEngine.js

+ 2 - 2
src/workflowEngine/WorkflowEngine.js

@@ -143,7 +143,7 @@ class WorkflowEngine {
           browser.windows.create({
             type: 'popup',
             width: 480,
-            height: window.screen.availHeight,
+            height: 650,
             url: browser.runtime.getURL(
               `/params.html?workflowId=${this.workflow.id}`
             ),
@@ -271,7 +271,7 @@ class WorkflowEngine {
   addLogHistory(detail) {
     if (detail.name === 'blocks-group') return;
 
-    const isLimit = this.history.length >= this.logsLimit;
+    const isLimit = this.history?.length >= this.logsLimit;
     const notErrorLog = detail.type !== 'error';
 
     if ((isLimit || !this.saveLog) && notErrorLog) return;