We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6d9c36 commit 31f3999Copy full SHA for 31f3999
src/scheduler.js
@@ -15,7 +15,7 @@ export function batch (fn, ctx, args) {
15
// this creates and returns a batched version of the passed function
16
// the cache is necessary to always map the same thing to the same function
17
// which makes sure that addEventListener/removeEventListener pairs don't break
18
-const cache = new Map()
+const cache = new WeakMap()
19
function batchFn (fn) {
20
if (typeof fn !== 'function') {
21
return fn
0 commit comments