From 3151ad980883a1969500a93a4f4504ac19e4c9a8 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Sat, 2 Apr 2022 11:11:17 +0800 Subject: Make more features work when my server is down --- features/events/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'features/events') diff --git a/features/events/index.js b/features/events/index.js index 58c408b..7ce40c8 100644 --- a/features/events/index.js +++ b/features/events/index.js @@ -152,7 +152,7 @@ class Events extends Feature { if(!this.showingWaypoints && showingWaypointsNew){ this.loadApi() - }else{ + }else if(showingWaypointsNew){ if(Date.now()-this.nextUpdateApprox > 0 && this.nextUpdateApprox > 0 && Date.now()-this.lastRequest>5000){ this.nextUpdateApprox = -2 this.loadApi() @@ -264,8 +264,10 @@ class Events extends Feature { }) this.burrialData.locations = newLocs - this.sortBurrialLocations() - this.updateBurrialPath() + if(this.showingWaypoints){ + this.sortBurrialLocations() + this.updateBurrialPath() + } } -- cgit