We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36829b9 commit 4a770e8Copy full SHA for 4a770e8
modules/locations/TestLocation.js
@@ -22,6 +22,8 @@ var TestLocation = {
22
23
history: [],
24
25
+ needsDOM: false,
26
+
27
addChangeListener: function (listener) {
28
// TestLocation only ever supports a single listener at a time.
29
_listener = listener;
modules/utils/createRouter.js
@@ -175,7 +175,7 @@ function createRouter(options) {
175
);
176
} else {
177
invariant(
178
- canUseDOM,
+ canUseDOM || location.needsDOM === false,
179
'You cannot use %s without a DOM',
180
location
181
0 commit comments