File tree Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ import DOMHistory from './DOMHistory';
2
2
import { getWindowPath , supportsHistory } from './DOMUtils' ;
3
3
import NavigationTypes from './NavigationTypes' ;
4
4
5
- var instance = null ;
6
-
7
5
function updateCurrentState ( extraState ) {
8
6
var state = window . history . state ;
9
7
@@ -107,11 +105,7 @@ class BrowserHistory extends DOMHistory {
107
105
window . location . replace ( path ) ;
108
106
}
109
107
}
110
-
111
- static get history ( ) {
112
- instance = instance || new BrowserHistory ( ) ;
113
- return instance ;
114
- }
115
108
}
116
109
110
+ export var history = new BrowserHistory ;
117
111
export default BrowserHistory ;
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import NavigationTypes from './NavigationTypes';
4
4
import { getHashPath , replaceHashPath } from './DOMUtils' ;
5
5
import { isAbsolutePath } from './URLUtils' ;
6
6
7
- var instance = null ;
8
7
var DefaultQueryKey = '_qk' ;
9
8
10
9
function ensureSlash ( ) {
@@ -168,11 +167,7 @@ class HashHistory extends DOMHistory {
168
167
makeHref ( path ) {
169
168
return '#' + path ;
170
169
}
171
-
172
- static get history ( ) {
173
- instance = instance || new HashHistory ( ) ;
174
- return instance ;
175
- }
176
170
}
177
171
172
+ export var history = new HashHistory ;
178
173
export default HashHistory ;
You can’t perform that action at this time.
0 commit comments