FIX: Can't load worker from a CDN source.

FIX: Can’t load worker from a CDN source.

diff --git a/assets/javascripts/initializers/discourse-graphviz.js.es6 b/assets/javascripts/initializers/discourse-graphviz.js.es6
index 968a7b7..78f6293 100644
--- a/assets/javascripts/initializers/discourse-graphviz.js.es6
+++ b/assets/javascripts/initializers/discourse-graphviz.js.es6
@@ -28,9 +28,7 @@ export default {
     $container.html($spinner);
 
     if (worker === undefined) {
-      worker = new Worker(
-        getURLWithCDN("/plugins/discourse-graphviz/javascripts/worker.js")
-      );
+      worker = new Worker("/plugins/discourse-graphviz/javascripts/worker.js");
 
       worker.postMessage({
         scriptURL: getURLWithCDN(

GitHub sha: b4a93f03

1 Like