Forum General Potential bug in JavaScript Chat example

Discussion and help relating to the PlayerIO JavaScript SDK

Potential bug in JavaScript Chat example

Postby TundrumMax » July 23rd, 2019, 11:26 am

So I just downloaded the PlayerIO sdk yesterday because I wanted to try doing some online projects (as you do). I was looking through the example code for the Chat room (JavaScript), so that I could do something similar as a starting project, and I found what may perhaps be a bug (maybe).

From what I can see, the code sample deletes a user id from the users array. However, users is not defined, but global.users is defined.

Image

So there are 2 possibilities; Either there is some hidden bit of code which defines the users array and I'm just being dumb, or the devs made an error in the code. Probably the former.

(Sorry if this is in the wrong topic, it's my first time posting and I just thought it was quite peculiar)

EDIT: I ran the sample and indeed, the user doesn't get deleted :)

Image
TundrumMax
 
Posts: 1
Joined: July 22nd, 2019, 8:22 pm

Re: Potential bug in JavaScript Chat example

Postby Henrik » September 20th, 2019, 8:09 am

Thanks for the catch! It's not exactly super important, but I've fixed it so it will be released the next time we do a client release. :D
Henrik
.IO
 
Posts: 1832
Joined: January 4th, 2010, 1:53 pm


Return to General



cron