Closed olhapi closed 7 months ago
@jgonggrijp can you check this and confirm that it's indeed a bug?
I've tried that, but I don't know how to test that case properly. My test succeeded when it should have failed. :)
Alright, in that case I will do it myself some time in the near future.
Thanks a lot
@olhapi Please remove the changes to backbone-min*
and then force-push the branch. We update the minified code when we cut a new release.
(I'm working on the regression test in the meanwhile.)
@jgonggrijp done, just pushed.
@olhapi The commit referenced above (https://github.com/jashkenas/backbone/commit/0f9956b565ca7d08421bdb3f9b2e583b38abc659) adds a test that fails without your fix and succeeds with it. Again thanks for contributing!
Here https://github.com/jashkenas/backbone/blob/master/backbone.js#L1088
this
has the wrong context, it refers to a window object in the browser because we didn't pass a previously saved collection context to it.