diff --git a/bun.lockb b/bun.lockb index 50c6d575..4e1e11dc 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/dist/index.js b/dist/index.js index 6581f1e5..7e45987d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -103,7 +103,7 @@ items.forEach((item) => { this.value.delete(item); if (!this.removalHandlers.has(item)) return; - this.removalHandlers.get(item)(item); + this.removalHandlers.get(item).forEach((handler) => handler(item)); this.removalHandlers.delete(item); }); this.callSubscriptions(); @@ -117,7 +117,9 @@ [...this.value.values()].forEach(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 toString() { @@ -146,7 +148,7 @@ this.value.delete(key); this.callSubscriptions(); if (!this.removalHandlers.has(item)) return; - this.removalHandlers.get(item)(item); + this.removalHandlers.get(item).forEach((handler) => handler(item)); this.removalHandlers.delete(item); } clear() { @@ -158,7 +160,9 @@ [...this.value.values()].forEach(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 toString() { diff --git a/package.json b/package.json index b5149311..8831dd28 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "dependencies": { - "bloatless-react": "^1.3.7", + "bloatless-react": "latest", "esbuild": "latest", - "udn-frontend": "^1.0.7-beta1" + "udn-frontend": "latest" }, "scripts": { "build": "esbuild src/index.tsx --bundle --outdir=dist"