Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Commit

Permalink
localStorage fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Vailorium committed Jan 28, 2021
1 parent 603f23b commit 4a9f7ef
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dist/main-es2015.js
Original file line number Diff line number Diff line change
Expand Up @@ -1712,6 +1712,9 @@ class ArBuilderComponent {
catch (e) {
this.settings = { grid: true, movement: true, weapon: true };
}
if (localStorage.getItem('ar-settings') === null) {
this.settings = { grid: true, movement: true, weapon: true };
}
if (!this.settings.grid) {
this.settings = { grid: true, movement: true, weapon: true };
}
Expand Down
8 changes: 8 additions & 0 deletions dist/main-es5.js
Original file line number Diff line number Diff line change
Expand Up @@ -3980,6 +3980,14 @@
};
}

if (localStorage.getItem('ar-settings') === null) {
this.settings = {
grid: true,
movement: true,
weapon: true
};
}

if (!this.settings.grid) {
this.settings = {
grid: true,
Expand Down
5 changes: 5 additions & 0 deletions src/app/pages/ar-builder/ar-builder.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ export class ArBuilderComponent implements OnInit, AfterViewInit {
this.settings = {grid: true, movement: true, weapon: true};
}

if(localStorage.getItem('ar-settings') === null){
this.settings = {grid: true, movement: true, weapon: true};
}

if(!this.settings.grid){
this.settings = {grid: true, movement: true, weapon: true};
}
Expand All @@ -163,6 +167,7 @@ export class ArBuilderComponent implements OnInit, AfterViewInit {
if(this.settings.weapon === undefined){
this.settings.weapon = true;
}

this.season.valueChanges.subscribe((data) => {
for(let i = 0; i < this.units.length; i++){
if(!this.units[i].blessing){
Expand Down

0 comments on commit 4a9f7ef

Please sign in to comment.