Skip to content

Commit

Permalink
[fixed] Using TestLocation without DOM
Browse files Browse the repository at this point in the history
Fixes #692
  • Loading branch information
mjackson committed Jan 16, 2015
1 parent 36829b9 commit 4a770e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions modules/locations/TestLocation.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ var TestLocation = {

history: [],

needsDOM: false,

addChangeListener: function (listener) {
// TestLocation only ever supports a single listener at a time.
_listener = listener;
Expand Down
2 changes: 1 addition & 1 deletion modules/utils/createRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function createRouter(options) {
);
} else {
invariant(
canUseDOM,
canUseDOM || location.needsDOM === false,
'You cannot use %s without a DOM',
location
);
Expand Down

0 comments on commit 4a770e8

Please sign in to comment.