Some time over the past few days my Javascript code stopped working without making any changes to it. I’ve been using Javascript compiled locally from CoffeeScript. Now member functions show an “undefined is not a function” error when I try to call them. Accessing member variables seems to work fine, however. My code hasn’t changed in over a week and it was working fine. Now I haven’t won a single match in more than 2 days.
We had to make some changes to prevent an exploit whereby passing arguments to functions wouldn’t properly protect the APIs of those arguments. It seems like that this change broke certain member functions that it thought were part of some protected API, although I haven’t been able to figure it out quite yet. I think in this case, it’s preventing you from writing to Strategy.prototype for some reason. I’ll track the bug over here.
Here’s a workaround. Instead of using Strategy.prototype, just assign those functions in your constructor:
I’m using the compiled Javascript instead of the Coffeescript because a week or two ago there were some Aether issues that broke my Coffeescript in CC. Figured out that with a couple of changes that compiling it to Javascript myself worked.