chayns-api 1.0.58 → 1.0.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -28,8 +28,11 @@ Comlink.transferHandlers.set("FUNCTION", {
|
|
|
28
28
|
},
|
|
29
29
|
deserialize(obj) {
|
|
30
30
|
obj._functionKeys.forEach(x => {
|
|
31
|
-
|
|
32
|
-
obj[x]
|
|
31
|
+
// under certain conditions deserialize can be called more than once on same object
|
|
32
|
+
if (obj[x] instanceof MessagePort) {
|
|
33
|
+
obj[x].start();
|
|
34
|
+
obj[x] = Comlink.wrap(obj[x]);
|
|
35
|
+
}
|
|
33
36
|
});
|
|
34
37
|
return obj;
|
|
35
38
|
}
|
|
@@ -24,8 +24,11 @@ Comlink.transferHandlers.set("FUNCTION", {
|
|
|
24
24
|
},
|
|
25
25
|
deserialize(obj) {
|
|
26
26
|
obj._functionKeys.forEach(x => {
|
|
27
|
-
|
|
28
|
-
obj[x]
|
|
27
|
+
// under certain conditions deserialize can be called more than once on same object
|
|
28
|
+
if (obj[x] instanceof MessagePort) {
|
|
29
|
+
obj[x].start();
|
|
30
|
+
obj[x] = Comlink.wrap(obj[x]);
|
|
31
|
+
}
|
|
29
32
|
});
|
|
30
33
|
return obj;
|
|
31
34
|
}
|