Browse Source

fix getting logContext for batch evaluation

Marc R Kellerman 1 year ago
parent
commit
f9131684fd
1 changed files with 2 additions and 0 deletions
  1. 2 0
      FreeAPS/Sources/APS/OpenAPS/JavaScriptWorker.swift

+ 2 - 0
FreeAPS/Sources/APS/OpenAPS/JavaScriptWorker.swift

@@ -134,7 +134,9 @@ final class JavaScriptWorker {
             returnContext(context)
         }
         scripts.forEach { script in
+            logContext = URL(fileURLWithPath: script.name).lastPathComponent
             context.evaluateScript(script.body)
+            outputLogs()
         }
     }
 }