@empoweredvote/ev-ui 0.6.0 → 0.6.1
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/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2811,13 +2811,14 @@ function onMessage(event) {
|
|
|
2811
2811
|
if (!data || typeof data !== "object") return;
|
|
2812
2812
|
if (data.type === "ev-context:value" || data.type === "ev-context:ack") {
|
|
2813
2813
|
const id = data.requestId;
|
|
2814
|
-
|
|
2814
|
+
const wasPending = id && pendingRequests.has(id);
|
|
2815
|
+
if (wasPending) {
|
|
2815
2816
|
const { resolve, timeout } = pendingRequests.get(id);
|
|
2816
2817
|
clearTimeout(timeout);
|
|
2817
2818
|
pendingRequests.delete(id);
|
|
2818
2819
|
resolve(data.type === "ev-context:value" ? (_a = data.value) != null ? _a : null : data.ok);
|
|
2819
2820
|
}
|
|
2820
|
-
if (data.type === "ev-context:value") {
|
|
2821
|
+
if (data.type === "ev-context:value" && !wasPending) {
|
|
2821
2822
|
lastValue = (_b = data.value) != null ? _b : null;
|
|
2822
2823
|
notifySubscribers();
|
|
2823
2824
|
}
|