From 95ccb112cd5341efb84daa7ba037458d10ab7f98 Mon Sep 17 00:00:00 2001 From: Xiao Gui <xgui3783@gmail.com> Date: Fri, 5 Feb 2021 19:16:42 +0100 Subject: [PATCH] bugfix: importing in worker --- worker/worker-plotly.js | 4 +++- worker/worker.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/worker/worker-plotly.js b/worker/worker-plotly.js index 3c7a6be2a..505cb1e63 100644 --- a/worker/worker-plotly.js +++ b/worker/worker-plotly.js @@ -190,5 +190,7 @@ } } })( - typeof exports === 'undefined' ? module.exports : exports + typeof exports === 'undefined' + ? self + : exports ) diff --git a/worker/worker.js b/worker/worker.js index e60464fa3..cd05c6ae4 100644 --- a/worker/worker.js +++ b/worker/worker.js @@ -7,7 +7,7 @@ globalThis.constants = { vtkHeader } -if (typeof self.importScripts === 'function') self.importScripts('./worker-second.js') +if (typeof self.importScripts === 'function') self.importScripts('./worker-plotly.js') /** * TODO migrate processing functionalities to other scripts -- GitLab