Skip to content

Commit 72c5c56

Browse files
committed
Merge pull request #19 from peteruithoven/patch-1
Use proper session id instead of whole String.match
2 parents a938df3 + 15243ce commit 72c5c56

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/app/store/configureStore.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ export default function configureStore(next) {
66
return compose(
77
DevTools.instrument(),
88
persistState(
9-
window.location.href.match(
10-
/[?&]debug_session=([^&]+)\b/
11-
)
9+
getPersistSession()
1210
)
1311
)(next);
1412
}
13+
function getPersistSession() {
14+
const matches = window.location.href.match(/[?&]debug_session=([^&]+)\b/);
15+
return (matches && matches.length > 0)? matches[1] : null;
16+
}

0 commit comments

Comments
 (0)