From a07cd20cb934dc9406136c8209927dfa1322cac4 Mon Sep 17 00:00:00 2001 From: Natsumi Date: Thu, 21 Apr 2022 00:52:53 +1200 Subject: [PATCH] Fix failed API requests stopping portal logs --- html/src/app.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/html/src/app.js b/html/src/app.js index 50e1bede..e290c0bb 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -8943,9 +8943,13 @@ speechSynthesis.getVoices(); ref ) { var L = API.parseLocation(instanceId); - var args = await API.getCachedWorld({ - worldId: L.worldId - }); + var name = instanceId; + try { + var args = await API.getCachedWorld({ + worldId: L.worldId + }); + name = args.ref.name; + } catch (err) {} this.addPhotonEventToGameLog({ created_at, type: 'PortalSpawn', @@ -8953,7 +8957,7 @@ speechSynthesis.getVoices(); location: this.lastLocation.location, userId: ref.id, instanceId, - worldName: args.ref.name + worldName: name }); };