From 890ecf8b56c4ac2036491edfcf9ca77cab859a1d Mon Sep 17 00:00:00 2001 From: laupies morgan Date: Sat, 20 Feb 2016 20:50:19 +0100 Subject: [PATCH] fix regexp to extract session name --- docs/Walkthrough.md | 2 +- examples/counter/src/store/configureStore.dev.js | 2 +- examples/todomvc/store/configureStore.dev.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Walkthrough.md b/docs/Walkthrough.md index 593d8f93..e474e957 100644 --- a/docs/Walkthrough.md +++ b/docs/Walkthrough.md @@ -121,7 +121,7 @@ const enhancer = compose( function getDebugSessionKey() { // You can write custom logic here! // By default we try to read the key from ?debug_session= in the address bar - const matches = window.location.href.match(/[?&]debug_session=([^&]+)\b/); + const matches = window.location.href.match(/[?&]debug_session=([^&#]+)\b/); return (matches && matches.length > 0)? matches[1] : null; } diff --git a/examples/counter/src/store/configureStore.dev.js b/examples/counter/src/store/configureStore.dev.js index e938fe4e..0d610f87 100644 --- a/examples/counter/src/store/configureStore.dev.js +++ b/examples/counter/src/store/configureStore.dev.js @@ -9,7 +9,7 @@ const enhancer = compose( DevTools.instrument(), persistState( window.location.href.match( - /[?&]debug_session=([^&]+)\b/ + /[?&]debug_session=([^&#]+)\b/ ) ) ); diff --git a/examples/todomvc/store/configureStore.dev.js b/examples/todomvc/store/configureStore.dev.js index 11702e97..41f0ef06 100644 --- a/examples/todomvc/store/configureStore.dev.js +++ b/examples/todomvc/store/configureStore.dev.js @@ -7,7 +7,7 @@ const enhancer = compose( DevTools.instrument(), persistState( window.location.href.match( - /[?&]debug_session=([^&]+)\b/ + /[?&]debug_session=([^&#]+)\b/ ) ) );