@nativewrappers/redm 0.0.172 → 0.0.173
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.
|
@@ -219,6 +219,7 @@ class NetworkedMap extends Map {
|
|
|
219
219
|
return Reflect.get(target, prop, reciever);
|
|
220
220
|
},
|
|
221
221
|
set(target, p, newValue, receiver) {
|
|
222
|
+
if (!super.has(key)) return false;
|
|
222
223
|
const success = Reflect.set(target, p, newValue, receiver);
|
|
223
224
|
if (success) {
|
|
224
225
|
curThis.#pushChangeForListener(key, target);
|
|
@@ -250,6 +251,14 @@ class NetworkedMap extends Map {
|
|
|
250
251
|
delete(key) {
|
|
251
252
|
$CLIENT: if (GlobalData.IS_CLIENT) throw new Error(`Cannot call 'delete' on client`);
|
|
252
253
|
this.#queuedChanges.push([2 /* Remove */, key]);
|
|
254
|
+
this.#queuedChanges = this.#queuedChanges.filter((v) => {
|
|
255
|
+
if (v[0] !== 2 /* Remove */) {
|
|
256
|
+
if (v[1] === key) {
|
|
257
|
+
return false;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return true;
|
|
261
|
+
});
|
|
253
262
|
return super.delete(key);
|
|
254
263
|
}
|
|
255
264
|
networkTick() {
|