Fix failed API requests stopping portal logs

This commit is contained in:
Natsumi
2022-04-21 00:52:53 +12:00
parent 98389b6171
commit a07cd20cb9

View File

@@ -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
});
};