File tree Expand file tree Collapse file tree 2 files changed +4
-17
lines changed Expand file tree Collapse file tree 2 files changed +4
-17
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -10,23 +10,15 @@ function safeToString(info: any): string {
1010}
1111
1212const DEBUG_LOG = '[ FEDERATION DEBUG ]' ;
13-
14- function safeGetLocalStorageItem ( ) {
15- try {
16- if ( typeof window !== 'undefined' && window . localStorage ) {
17- return localStorage . getItem ( BROWSER_LOG_KEY ) === BROWSER_LOG_VALUE ;
18- }
19- } catch ( error ) {
20- return typeof typeof document !== 'undefined' ;
21- }
22- return false ;
23- }
2413class Logger {
2514 enable = false ;
2615 identifier : string ;
2716 constructor ( identifier ?: string ) {
2817 this . identifier = identifier || DEBUG_LOG ;
29- if ( isBrowserEnv ( ) && safeGetLocalStorageItem ( ) ) {
18+ if (
19+ isBrowserEnv ( ) &&
20+ localStorage . getItem ( BROWSER_LOG_KEY ) === BROWSER_LOG_VALUE
21+ ) {
3022 this . enable = true ;
3123 } else if ( isDebugMode ( ) ) {
3224 this . enable = true ;
You can’t perform that action at this time.
0 commit comments