Skip to content

Commit fd87dfb

Browse files
committed
Changed the static method to a static getter for a cleaner usage syntax
1 parent 67b3aac commit fd87dfb

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

modules/BrowserHistory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class BrowserHistory extends DOMHistory {
108108
}
109109
}
110110

111-
static history() {
111+
static get history() {
112112
instance = instance || new BrowserHistory();
113113
return instance;
114114
}

modules/HashHistory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class HashHistory extends DOMHistory {
169169
return '#' + path;
170170
}
171171

172-
static history() {
172+
static get history() {
173173
instance = instance || new HashHistory();
174174
return instance;
175175
}

modules/__tests__/BrowserHistory-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import BrowserHistory, { history } from '../BrowserHistory';
33

44
describe('BrowserHistory', function () {
55
describeHistory(new BrowserHistory);
6-
describeHistory(history());
6+
describeHistory(history);
77
});

modules/__tests__/HashHistory-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import HashHistory, { history } from '../HashHistory';
33

44
describe('HashHistory', function () {
55
describeHistory(new HashHistory);
6-
describeHistory(history());
6+
describeHistory(history);
77
});

0 commit comments

Comments
 (0)