Duplicate response - Twitch TV API [solved]

Duplicate response - Twitch TV API [solved]
0

#1

Hi,

I’ve got a weird issue where I am getting duplicate objects returned for each user. If you look in console at the second array, you will see it has duplicated objects. Can anyone see why that might be?

Site Link

code

please note:

  • I am not talking about the 2 arrays, there are 2 because the log runs at page refresh and after the functions have run.

  • The array is there bacase I will parse from it. I know I can find someway to clean the array of duplicates… but why should I?

  • The duplicate happens even outside of the loop (I can use only the code thats commented out at the bottom and still get a duplicate)

Any ideas?

thanks

Mark


#2

School boy error. A gold star to anyone who figures it out before I commit again later.


#3

Could it be that you have two times the main.js script in your index.html? :wink:


#4

that be the one :smiley:

took me 2hrs to realise that. I didn’t even look in my html tbh until it suddenly clicked haha

edit: nearly forgot: :star: