Ok, im back, my school actually hand a jog a thon I forgot about and then I had to go to martial arts practice.
anyways, I think this error is because either
-broken[0] is not defined yet or
-your collision thingy moves the player's y when it touches the platform
so here is What you should try, tell me if it works or not.
for(var indx = 0; indx < BROKEN.length; indx++){
if(player.isTouching(BROKEN[indx])){
BROKEN[indx].velocityY = 5;//or whatever you want to happen
}
}