update
This commit is contained in:
Vendored
+8
-4
@@ -103,7 +103,7 @@
|
|||||||
items.forEach((item) => {
|
items.forEach((item) => {
|
||||||
this.value.delete(item);
|
this.value.delete(item);
|
||||||
if (!this.removalHandlers.has(item)) return;
|
if (!this.removalHandlers.has(item)) return;
|
||||||
this.removalHandlers.get(item)(item);
|
this.removalHandlers.get(item).forEach((handler) => handler(item));
|
||||||
this.removalHandlers.delete(item);
|
this.removalHandlers.delete(item);
|
||||||
});
|
});
|
||||||
this.callSubscriptions();
|
this.callSubscriptions();
|
||||||
@@ -117,7 +117,9 @@
|
|||||||
[...this.value.values()].forEach(handler);
|
[...this.value.values()].forEach(handler);
|
||||||
}
|
}
|
||||||
handleRemoval(item, handler) {
|
handleRemoval(item, handler) {
|
||||||
this.removalHandlers.set(item, handler);
|
if (!this.removalHandlers.has(item))
|
||||||
|
this.removalHandlers.set(item, /* @__PURE__ */ new Set());
|
||||||
|
this.removalHandlers.get(item).add(handler);
|
||||||
}
|
}
|
||||||
// stringification
|
// stringification
|
||||||
toString() {
|
toString() {
|
||||||
@@ -146,7 +148,7 @@
|
|||||||
this.value.delete(key);
|
this.value.delete(key);
|
||||||
this.callSubscriptions();
|
this.callSubscriptions();
|
||||||
if (!this.removalHandlers.has(item)) return;
|
if (!this.removalHandlers.has(item)) return;
|
||||||
this.removalHandlers.get(item)(item);
|
this.removalHandlers.get(item).forEach((handler) => handler(item));
|
||||||
this.removalHandlers.delete(item);
|
this.removalHandlers.delete(item);
|
||||||
}
|
}
|
||||||
clear() {
|
clear() {
|
||||||
@@ -158,7 +160,9 @@
|
|||||||
[...this.value.values()].forEach(handler);
|
[...this.value.values()].forEach(handler);
|
||||||
}
|
}
|
||||||
handleRemoval(item, handler) {
|
handleRemoval(item, handler) {
|
||||||
this.removalHandlers.set(item, handler);
|
if (!this.removalHandlers.has(item))
|
||||||
|
this.removalHandlers.set(item, /* @__PURE__ */ new Set());
|
||||||
|
this.removalHandlers.get(item).add(handler);
|
||||||
}
|
}
|
||||||
// stringification
|
// stringification
|
||||||
toString() {
|
toString() {
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bloatless-react": "^1.3.7",
|
"bloatless-react": "latest",
|
||||||
"esbuild": "latest",
|
"esbuild": "latest",
|
||||||
"udn-frontend": "^1.0.7-beta1"
|
"udn-frontend": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "esbuild src/index.tsx --bundle --outdir=dist"
|
"build": "esbuild src/index.tsx --bundle --outdir=dist"
|
||||||
|
|||||||
Reference in New Issue
Block a user