Skip to content
This repository has been archived by the owner on Apr 21, 2021. It is now read-only.

Commit

Permalink
SF
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Basto committed Jun 6, 2016
1 parent 1a1e36c commit fbb3321
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,7 @@ class App extends EventEmitter {
console.log('Navigation error for [' + nextScreen + '] (' + err + ')');
if (!utils.isCurrentBrowserPath(path)) {
if (this.pendingNavigate) {
this.pendingNavigate.thenAlways(function() {
this.removeScreen(path);
}, this);
this.pendingNavigate.thenAlways(() => this.removeScreen(path), this);
}
else {
this.removeScreen(path);
Expand Down
4 changes: 2 additions & 2 deletions test/app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -1279,9 +1279,9 @@ describe('App', function() {
.then(() => app.navigate('/path2'))
.then(() => app.navigate('/path3'))
.then(() => {
app.on('endNavigate', function() {
app.on('endNavigate', () => {
assert.ok(app.screens['/path2']);
app.pendingNavigate.then(function() {
app.pendingNavigate.then(() => {
assert.ok(!app.screens['/path2']);
done();
});
Expand Down

0 comments on commit fbb3321

Please sign in to comment.