Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit d847fce

Browse files
committed
back to splice
1 parent fcdd2b3 commit d847fce

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/native/utils/game-loop.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ export default class GameLoop {
2525
return this.subscribers.push(callback);
2626
}
2727
unsubscribe(id) {
28-
delete this.subscribers[id - 1];
28+
this.subscribers.splice((id - 1), 1);
2929
}
3030
}

src/utils/game-loop.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ export default class GameLoop {
2525
return this.subscribers.push(callback);
2626
}
2727
unsubscribe(id) {
28-
delete this.subscribers[id - 1];
28+
this.subscribers.splice((id - 1), 1);
2929
}
3030
}

0 commit comments

Comments
 (0)