File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export class DemoApp {
69
69
constructor ( private _element : ElementRef ) {
70
70
// Some browsers will throw when trying to access localStorage in incognito.
71
71
try {
72
- this . changeDetectionStrategy = localStorage . getItem ( changeDetectionKey ) || 'Default' ;
72
+ this . changeDetectionStrategy = window . localStorage . getItem ( changeDetectionKey ) || 'Default' ;
73
73
} catch ( error ) {
74
74
console . error ( error ) ;
75
75
}
@@ -92,8 +92,8 @@ export class DemoApp {
92
92
try {
93
93
this . changeDetectionStrategy = this . changeDetectionStrategy === 'Default' ?
94
94
'OnPush' : 'Default' ;
95
- localStorage . setItem ( changeDetectionKey , this . changeDetectionStrategy ) ;
96
- location . reload ( ) ;
95
+ window . localStorage . setItem ( changeDetectionKey , this . changeDetectionStrategy ) ;
96
+ window . location . reload ( ) ;
97
97
} catch ( error ) {
98
98
console . error ( error ) ;
99
99
}
You can’t perform that action at this time.
0 commit comments