Skip to content

Commit

Permalink
🎨 optimize code
Browse files Browse the repository at this point in the history
  • Loading branch information
kuitos committed Mar 11, 2024
1 parent 9f5a4bd commit 666ceda
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/sandbox/patchers/windowListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ const addCacheListener = (
}

const cacheListener = { listener, options, rawListener };
cachedTypeListeners.push(cacheListener);
listenerMap.set(type, cachedTypeListeners);
listenerMap.set(type, [...cachedTypeListeners, cacheListener]);
return cacheListener;
};

Expand Down

0 comments on commit 666ceda

Please sign in to comment.