We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af195e2 commit c521373Copy full SHA for c521373
interfaces/js/src/infomap.js
@@ -12,11 +12,11 @@ class Infomap {
12
13
_workerId = 0;
14
_workers = {};
15
- _workerBlob = new Blob([InfomapWorker], { type: "application/javascript" });
16
17
initWorkerUrl() {
18
if (this._workerUrl) return;
19
- this._workerUrl = URL.createObjectURL(this._workerBlob);
+ const blob = new Blob([InfomapWorker], { type: "application/javascript" });
+ this._workerUrl = URL.createObjectURL(blob);
20
}
21
22
revokeWorkerUrl() {
@@ -99,10 +99,6 @@ class Infomap {
99
100
101
delete this._workers[id];
102
-
103
- if (Object.keys(this._workers).length === 0) {
104
- this.revokeWorkerUrl();
105
- }
106
107
108
0 commit comments