Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An id is sometimes undefined when changing rooms #47

Open
KevinW90 opened this issue Nov 23, 2020 · 0 comments
Open

An id is sometimes undefined when changing rooms #47

KevinW90 opened this issue Nov 23, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@KevinW90
Copy link
Collaborator

moving rooms sometimes causes an id to be undefined. Either ef.id or poison.id from the console error.

Error Message:
enterRoom.js:73 Uncaught TypeError: Cannot read property 'id' of undefined
at enterRoom.js:73
at Array.findIndex ()
at CurrentRoom.destroy (enterRoom.js:73)
at enterNewRoom (enterRoom.js:39)
at HTMLElement.action (player.js:75)
at HTMLElement. (touch-icon.js:28)
(anonymous) @ enterRoom.js:73
destroy @ enterRoom.js:73
enterNewRoom @ enterRoom.js:39
action @ player.js:75
(anonymous) @ touch-icon.js:28

enterRoom.js:73 let i = this._player.effects.findIndex((ef) => ef.id === this._poison.id);

@KevinW90 KevinW90 added the bug Something isn't working label Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant