Sorry for the dumb question but… Are you getting the errors in Sublime or just in the browsers?
If they are only in the browsers then it’s likely a bug in you code not in the editor…
Apart from that, with just the console output it’s quite impossible to track the bug, I can say the problem is given by the fact that the script is trying to get a property (isStopped) from a reference that is actually pointing to nothing (you are passing the wrong object reference to the function/method in the script), but then again, why this is happening is impossible to tell…