We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ccf4149 commit a030648Copy full SHA for a030648
modules/locations/MemoryLocation.js
@@ -1,7 +1,7 @@
1
-var invariant = require('react/lib/invariant');
+var warning = require('react/lib/warning');
2
3
-var _lastPath;
4
-var _currentPath = '/';
+var _lastPath = null;
+var _currentPath = null;
5
var _onChange;
6
7
/**
@@ -25,7 +25,7 @@ var MemoryLocation = {
25
},
26
27
pop: function () {
28
- invariant(
+ warning(
29
_lastPath != null,
30
'You cannot use MemoryLocation to go back more than once'
31
);
@@ -36,7 +36,7 @@ var MemoryLocation = {
36
37
38
getCurrentPath: function () {
39
- return _currentPath;
+ return _currentPath || '/';
40
41
42
toString: function () {
0 commit comments