From a0306483e8648d913a6abe05bd35129bff12c153 Mon Sep 17 00:00:00 2001 From: Michael Jackson Date: Sun, 17 Aug 2014 22:13:14 -0700 Subject: [PATCH] [changed] Relaxed MemoryStore invariant --- modules/locations/MemoryLocation.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/locations/MemoryLocation.js b/modules/locations/MemoryLocation.js index 1a3a43b906..57f39b099d 100644 --- a/modules/locations/MemoryLocation.js +++ b/modules/locations/MemoryLocation.js @@ -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; /** @@ -25,7 +25,7 @@ var MemoryLocation = { }, pop: function () { - invariant( + warning( _lastPath != null, 'You cannot use MemoryLocation to go back more than once' ); @@ -36,7 +36,7 @@ var MemoryLocation = { }, getCurrentPath: function () { - return _currentPath; + return _currentPath || '/'; }, toString: function () {