Skip to content

Commit 23c0aff

Browse files
agundermannmjackson
authored andcommitted
Style tweaks
1 parent 28a49f7 commit 23c0aff

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

modules/BrowserHistory.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class BrowserHistory extends DOMHistory {
4343
if (this.isSupported && window.history.state)
4444
key = window.history.state.key;
4545

46-
super.setup(path, {key});
46+
super.setup(path, { key });
4747
}
4848

4949
handlePopState(event) {
@@ -52,7 +52,7 @@ class BrowserHistory extends DOMHistory {
5252

5353
var path = getWindowPath();
5454
var key = event.state && event.state.key;
55-
this.handlePop(path, {key});
55+
this.handlePop(path, { key });
5656
}
5757

5858
addChangeListener(listener) {

modules/History.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ class History {
5656
if (typeof this.readState === 'function')
5757
state = this.readState(entry.key);
5858

59-
this._handleChange(path, state, entry, NavigationTypes.POP, false);
59+
this._update(path, state, entry, NavigationTypes.POP, false);
6060
}
6161

6262
handlePop(path, entry = {}) {
6363
var state = null;
6464
if (entry.key && typeof this.readState === 'function')
6565
state = this.readState(entry.key);
6666

67-
this._handleChange(path, state, entry, NavigationTypes.POP);
67+
this._update(path, state, entry, NavigationTypes.POP);
6868
}
6969

7070
createRandomKey() {
@@ -103,7 +103,7 @@ class History {
103103
this.constructor.name
104104
);
105105

106-
this._handleChange(path, state, entry, NavigationTypes.PUSH);
106+
this._update(path, state, entry, NavigationTypes.PUSH);
107107
}
108108

109109
replaceState(state, path) {
@@ -117,7 +117,7 @@ class History {
117117
this.constructor.name
118118
);
119119

120-
this._handleChange(path, state, entry, NavigationTypes.REPLACE);
120+
this._update(path, state, entry, NavigationTypes.REPLACE);
121121
}
122122

123123
back() {
@@ -128,7 +128,7 @@ class History {
128128
this.go(1);
129129
}
130130

131-
_handleChange(path, state, entry, navigationType, notify=true) {
131+
_update(path, state, entry, navigationType, notify=true) {
132132
this.path = path;
133133
this.location = this._createLocation(path, state, entry, navigationType);
134134

modules/MemoryHistory.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class MemoryHistory extends History {
5050
var path = entry.path;
5151
var key = entry.key;
5252

53-
super.setup(path, {key, current: this.current});
53+
super.setup(path, { key, current: this.current });
5454
}
5555

5656
_createEntry(object) {
@@ -69,14 +69,14 @@ class MemoryHistory extends History {
6969
this.current += 1;
7070
this.entries = this.entries.slice(0, this.current).concat([{ key, path }]);
7171

72-
return {key, current: this.current};
72+
return { key, current: this.current };
7373
}
7474

7575
// http://www.w3.org/TR/2011/WD-html5-20110113/history.html#dom-history-replacestate
7676
replace(path, key) {
7777
this.entries[this.current] = { key, path };
7878

79-
return {key, current: this.current};
79+
return { key, current: this.current };
8080
}
8181

8282
readState(key) {
@@ -100,7 +100,7 @@ class MemoryHistory extends History {
100100
this.current += n;
101101
var currentEntry = this.entries[this.current];
102102

103-
this.handlePop(currentEntry.path, {key: currentEntry.key, current: this.current});
103+
this.handlePop(currentEntry.path, { key: currentEntry.key, current: this.current });
104104
}
105105

106106
canGo(n) {

0 commit comments

Comments
 (0)