Skip to content

Commit 9c8e2d6

Browse files
committed
Remove unnecessary invariant
1 parent 49548fd commit 9c8e2d6

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

modules/locations/HashLocation.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
var invariant = require('react/lib/invariant');
2-
var canUseDOM = require('react/lib/ExecutionEnvironment').canUseDOM;
32
var LocationActions = require('../actions/LocationActions');
43
var Path = require('../utils/Path');
54

@@ -8,11 +7,6 @@ var Path = require('../utils/Path');
87
* query string.
98
*/
109
function getHashPath() {
11-
invariant(
12-
canUseDOM,
13-
'getHashPath needs a DOM'
14-
);
15-
1610
return Path.decode(
1711
// We can't use window.location.hash here because it's not
1812
// consistent across browsers - Firefox will pre-decode it!

modules/locations/HistoryLocation.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
var invariant = require('react/lib/invariant');
2-
var canUseDOM = require('react/lib/ExecutionEnvironment').canUseDOM;
32
var LocationActions = require('../actions/LocationActions');
43
var Path = require('../utils/Path');
54

65
/**
76
* Returns the current URL path from `window.location`, including query string.
87
*/
98
function getWindowPath() {
10-
invariant(
11-
canUseDOM,
12-
'getWindowPath needs a DOM'
13-
);
14-
159
return Path.decode(
1610
window.location.pathname + window.location.search
1711
);

0 commit comments

Comments
 (0)