mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-08-18 00:28:42 +02:00
fixed all tests with weird function scoping bug
This commit is contained in:
parent
36161d3406
commit
dd4bec0597
6 changed files with 37 additions and 18 deletions
|
@ -69,11 +69,16 @@ var LevelDropdownView = ContainedBase.extend({
|
|||
title: intl.str('select-a-level')
|
||||
});
|
||||
|
||||
// Lol WTF. For some reason we cant use this.render.bind(this) so
|
||||
// instead setup a lame callback version. The CasperJS tests
|
||||
// fail otherwise.
|
||||
var that = this;
|
||||
LocaleStore.subscribe(function() {
|
||||
that.render.apply(that);
|
||||
});
|
||||
this.render();
|
||||
|
||||
Main.getEvents().on('resetMapSolved', this.render, this);
|
||||
LocaleStore.subscribe(this.render.bind(this));
|
||||
|
||||
if (!options.wait) {
|
||||
this.show();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue