Skip to content

Commit 2b4e16d

Browse files
committed
fix: forEach doesn't allow mutations
Even though documentation says it should.
1 parent 0ad12bc commit 2b4e16d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/utils/eventEmitter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ wrap(() => {
4747

4848
if (Array.isArray(e) && e.length) {
4949
ran = true;
50-
e.forEach((ev) => {
50+
[...e].forEach((ev) => {
5151
// Should we stop processing on cancel? Maybe.
5252
try {
5353
const meta = { event, cancelable, canceled };

0 commit comments

Comments
 (0)