Skip to content

Commit 70518a8

Browse files
committed
Remove interface for postponing pop events
1 parent aca7d7c commit 70518a8

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

modules/History.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,14 @@ class History {
8484
this._pendingLocation = null;
8585
}
8686

87-
handlePop(path, entry={}, applyEntry=null) {
87+
handlePop(path, entry={}) {
8888
var state = null;
8989
if (entry.key && typeof this.readState === 'function')
9090
state = this.readState(entry.key);
9191

9292
var pendingLocation = this._createLocation(path, state, entry, NavigationTypes.POP);
9393

9494
this.beforeChange(pendingLocation, () => {
95-
applyEntry && applyEntry();
9695
this._update(path, pendingLocation);
9796
});
9897
}

modules/MemoryHistory.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,10 @@ class MemoryHistory extends History {
9696
this.constructor.name, n
9797
);
9898

99-
var next = this.current + n;
100-
var nextEntry = this.entries[next];
99+
this.current += n;
100+
var entry = this.entries[this.current];
101101

102-
this.handlePop(nextEntry.path, { key: nextEntry.key, current: this.current }, () => {
103-
this.current = next;
104-
});
102+
this.handlePop(entry.path, { key: entry.key, current: this.current });
105103
}
106104

107105
canGo(n) {

0 commit comments

Comments
 (0)