You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NaN is appended to player.id on the client-side after interpolation. This happens after the second update is received from the server (i.e. the first time interpolation is performed).
Steps to reproduce:
Add console.log(me.id); to the start of the render() function in src/client/render.js.
Start the server with npm run develop from the command line.
Visit localhost:3000.
Open dev tools (ctrl + shift + j on Windows).
Join the game by clicking on PLAY.
Expected results:
My socket id (e.g. ljLSqzmUSc5ZGEf5AAAC) is logged to console repeatedly.
Actual results:
My socket id is logged to console 6 times (e.g. ljLSqzmUSc5ZGEf5AAAC).
My socket id appended with NaN (e.g. ljLSqzmUSc5ZGEf5AAACNaN) is logged to console repeatedly.
Additional information:
I encountered this bug when trying to implement a chat feature. Each chat object had a reference to it's parentId without NaN appended to it. I was unable to match chat objects to players in the render() function in src/client/render.js because the player id's had changed to have NaN appended to them.
The text was updated successfully, but these errors were encountered:
Summary:
NaN
is appended toplayer.id
on the client-side after interpolation. This happens after the second update is received from the server (i.e. the first time interpolation is performed).Steps to reproduce:
console.log(me.id);
to the start of therender()
function insrc/client/render.js
.npm run develop
from the command line.localhost:3000
.PLAY
.Expected results:
My socket id (e.g.
ljLSqzmUSc5ZGEf5AAAC
) is logged to console repeatedly.Actual results:
ljLSqzmUSc5ZGEf5AAAC
).NaN
(e.g.ljLSqzmUSc5ZGEf5AAACNaN
) is logged to console repeatedly.Additional information:
I encountered this bug when trying to implement a chat feature. Each chat object had a reference to it's
parentId
withoutNaN
appended to it. I was unable to match chat objects to players in therender()
function insrc/client/render.js
because the player id's had changed to haveNaN
appended to them.The text was updated successfully, but these errors were encountered: