Merge pull request #251 from ganmor/debug-session-name

fix regexp to extract debug session name
This commit is contained in:
Dan Abramov 2016-02-20 22:57:25 +00:00
commit 0e0d115ddb
3 changed files with 3 additions and 3 deletions

View File

@ -121,7 +121,7 @@ const enhancer = compose(
function getDebugSessionKey() { function getDebugSessionKey() {
// You can write custom logic here! // You can write custom logic here!
// By default we try to read the key from ?debug_session=<key> in the address bar // By default we try to read the key from ?debug_session=<key> 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; return (matches && matches.length > 0)? matches[1] : null;
} }

View File

@ -9,7 +9,7 @@ const enhancer = compose(
DevTools.instrument(), DevTools.instrument(),
persistState( persistState(
window.location.href.match( window.location.href.match(
/[?&]debug_session=([^&]+)\b/ /[?&]debug_session=([^&#]+)\b/
) )
) )
); );

View File

@ -7,7 +7,7 @@ const enhancer = compose(
DevTools.instrument(), DevTools.instrument(),
persistState( persistState(
window.location.href.match( window.location.href.match(
/[?&]debug_session=([^&]+)\b/ /[?&]debug_session=([^&#]+)\b/
) )
) )
); );