Skip to content

Commit 942dd12

Browse files
authored
Set authCookiesAllowed to false when setting cookiesAllowed to false, and only set cookies to true if cookies hasn't been set yet (#235)
1 parent afab4fd commit 942dd12

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/components/Auth.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,9 @@ export default {
447447
}
448448
this.setTabID();
449449
},
450+
disallowCookies() {
451+
this.authCookiesAllowed = false;
452+
},
450453
getAgent: function () {
451454
const ua = UAParser(navigator.userAgent);
452455
return navigator.platform + ' ' + ua.browser.name + ' Tab ' + this.tabID;

src/pages/MainPage.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,10 @@ export default {
375375
roads: {
376376
handler: function (newRoads, oldRoads) {
377377
this.justLoaded = false;
378-
this.cookiesAllowed = true;
379-
this.$refs.authcomponent.allowCookies();
378+
if(this.cookiesAllowed === undefined) {
379+
this.cookiesAllowed = true;
380+
this.$refs.authcomponent.allowCookies();
381+
}
380382
if (this.activeRoad !== '') {
381383
this.updateFulfillment();
382384
}
@@ -581,6 +583,7 @@ export default {
581583
for(var k = 0; k < cookieKeys.length; k++) {
582584
this.$cookies.remove(cookieKeys[k]);
583585
}
586+
this.$refs.authcomponent.disallowCookies();
584587
},
585588
updateLocal: function (id) {
586589
this.$refs.authcomponent.updateLocal(id);

0 commit comments

Comments
 (0)