mol_wire_dom 0.0.1524 → 0.0.1526
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.
- package/node.deps.json +1 -1
- package/node.js +10 -2
- package/node.js.map +1 -1
- package/node.mjs +10 -2
- package/node.test.js +10 -2
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.deps.json +1 -1
- package/web.js +10 -2
- package/web.js.map +1 -1
- package/web.mjs +10 -2
package/node.mjs
CHANGED
@@ -887,10 +887,12 @@ var $;
|
|
887
887
|
result = wrappers.get(result);
|
888
888
|
}
|
889
889
|
else {
|
890
|
-
|
890
|
+
const put = (v) => {
|
891
891
|
if (this.cache === result)
|
892
892
|
this.absorb();
|
893
|
-
|
893
|
+
return v;
|
894
|
+
};
|
895
|
+
wrappers.set(result, result = Object.assign(result.then(put, put), { destructor: result.destructor || (() => { }) }));
|
894
896
|
const error = new Error(`Promise in ${this}`);
|
895
897
|
Object.defineProperty(result, 'stack', { get: () => error.stack });
|
896
898
|
}
|
@@ -1942,6 +1944,12 @@ var $;
|
|
1942
1944
|
$mol_wire_atom.watching.add(this);
|
1943
1945
|
}
|
1944
1946
|
resync(args) {
|
1947
|
+
for (let cursor = this.pub_from; cursor < this.sub_from; cursor += 2) {
|
1948
|
+
const pub = this.data[cursor];
|
1949
|
+
if (pub && pub instanceof $mol_wire_task) {
|
1950
|
+
pub.destructor();
|
1951
|
+
}
|
1952
|
+
}
|
1945
1953
|
return this.put(this.task.call(this.host, ...args));
|
1946
1954
|
}
|
1947
1955
|
once() {
|
package/node.test.js
CHANGED
@@ -878,10 +878,12 @@ var $;
|
|
878
878
|
result = wrappers.get(result);
|
879
879
|
}
|
880
880
|
else {
|
881
|
-
|
881
|
+
const put = (v) => {
|
882
882
|
if (this.cache === result)
|
883
883
|
this.absorb();
|
884
|
-
|
884
|
+
return v;
|
885
|
+
};
|
886
|
+
wrappers.set(result, result = Object.assign(result.then(put, put), { destructor: result.destructor || (() => { }) }));
|
885
887
|
const error = new Error(`Promise in ${this}`);
|
886
888
|
Object.defineProperty(result, 'stack', { get: () => error.stack });
|
887
889
|
}
|
@@ -1933,6 +1935,12 @@ var $;
|
|
1933
1935
|
$mol_wire_atom.watching.add(this);
|
1934
1936
|
}
|
1935
1937
|
resync(args) {
|
1938
|
+
for (let cursor = this.pub_from; cursor < this.sub_from; cursor += 2) {
|
1939
|
+
const pub = this.data[cursor];
|
1940
|
+
if (pub && pub instanceof $mol_wire_task) {
|
1941
|
+
pub.destructor();
|
1942
|
+
}
|
1943
|
+
}
|
1936
1944
|
return this.put(this.task.call(this.host, ...args));
|
1937
1945
|
}
|
1938
1946
|
once() {
|