upfix localstorage iframe
This commit is contained in:
@@ -18,7 +18,10 @@ export class ServicesComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
this.view = localStorage.getItem("bstly.servicesView") || 'grid';
|
||||
this.view = 'grid';
|
||||
try {
|
||||
this.view = localStorage.getItem("bstly.servicesView") || this.view;
|
||||
} catch { }
|
||||
|
||||
this.serviceService.services().subscribe({
|
||||
next: (data: Array<any>) => {
|
||||
@@ -39,7 +42,9 @@ export class ServicesComponent implements OnInit {
|
||||
}
|
||||
|
||||
updateView(): void {
|
||||
localStorage.setItem("bstly.servicesView", this.view);
|
||||
try {
|
||||
localStorage.setItem("bstly.servicesView", this.view);
|
||||
} catch { }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user