File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
packages/signals/signals/src Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -137,10 +137,14 @@ export class SignalsDebugSettings {
137137 }
138138
139139 getDisableSignalsRedaction = ( ) : boolean => {
140- return this . storage . getItem ( SignalsDebugSettings . redactionKey ) ?? false
140+ return (
141+ this . storage . getBooleanItem ( SignalsDebugSettings . redactionKey ) ?? false
142+ )
141143 }
142144
143145 getEnableSignalsIngestion = ( ) : boolean => {
144- return this . storage . getItem ( SignalsDebugSettings . ingestionKey ) ?? false
146+ return (
147+ this . storage . getBooleanItem ( SignalsDebugSettings . ingestionKey ) ?? false
148+ )
145149 }
146150}
Original file line number Diff line number Diff line change @@ -12,12 +12,17 @@ export class WebStorage {
1212 }
1313 }
1414
15- public getItem = < T > ( key : string ) : T | undefined => {
15+ public getItem = ( key : string ) : string | undefined => {
1616 try {
17- return ( this . storage . getItem ( key ) as T ) ?? undefined
17+ return this . storage . getItem ( key ) ?? undefined
1818 } catch ( e ) {
1919 console . warn ( 'Storage error' , e )
2020 }
2121 return undefined
2222 }
23+
24+ public getBooleanItem = ( key : string ) : boolean | undefined => {
25+ const item = this . getItem ( key )
26+ return item === 'true' ? true : item === 'false' ? false : undefined
27+ }
2328}
You can’t perform that action at this time.
0 commit comments