mirror of
				https://github.com/reduxjs/redux-devtools.git
				synced 2025-11-04 09:57:26 +03:00 
			
		
		
		
	Merge pull request #251 from ganmor/debug-session-name
fix regexp to extract debug session name
This commit is contained in:
		
						commit
						0e0d115ddb
					
				| 
						 | 
				
			
			@ -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=<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;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,7 +9,7 @@ const enhancer = compose(
 | 
			
		|||
  DevTools.instrument(),
 | 
			
		||||
  persistState(
 | 
			
		||||
    window.location.href.match(
 | 
			
		||||
      /[?&]debug_session=([^&]+)\b/
 | 
			
		||||
      /[?&]debug_session=([^&#]+)\b/
 | 
			
		||||
    )
 | 
			
		||||
  )
 | 
			
		||||
);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,7 +7,7 @@ const enhancer = compose(
 | 
			
		|||
  DevTools.instrument(),
 | 
			
		||||
  persistState(
 | 
			
		||||
    window.location.href.match(
 | 
			
		||||
      /[?&]debug_session=([^&]+)\b/
 | 
			
		||||
      /[?&]debug_session=([^&#]+)\b/
 | 
			
		||||
    )
 | 
			
		||||
  )
 | 
			
		||||
);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user