Skip to content

Commit

Permalink
[changed] Relaxed MemoryStore invariant
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Aug 18, 2014
1 parent ccf4149 commit a030648
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/locations/MemoryLocation.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var invariant = require('react/lib/invariant');
var warning = require('react/lib/warning');

var _lastPath;
var _currentPath = '/';
var _lastPath = null;
var _currentPath = null;
var _onChange;

/**
Expand All @@ -25,7 +25,7 @@ var MemoryLocation = {
},

pop: function () {
invariant(
warning(
_lastPath != null,
'You cannot use MemoryLocation to go back more than once'
);
Expand All @@ -36,7 +36,7 @@ var MemoryLocation = {
},

getCurrentPath: function () {
return _currentPath;
return _currentPath || '/';
},

toString: function () {
Expand Down

0 comments on commit a030648

Please sign in to comment.