diff --git a/html/src/app.js b/html/src/app.js
index 4bad957f..fcc07826 100644
--- a/html/src/app.js
+++ b/html/src/app.js
@@ -14889,7 +14889,6 @@ speechSynthesis.getVoices();
currentLocation = $app.lastLocationDestination;
}
if (!currentLocation) return;
- var L = this.parseLocation(currentLocation);
if (
$app.autoAcceptInviteRequests === 'All Favorites' &&
!$app.favoriteFriends.some((x) => x.id === ref.senderUserId)
@@ -14902,22 +14901,31 @@ speechSynthesis.getVoices();
)
return;
- this.getCachedWorld({
- worldId: L.worldId
- }).then((args1) => {
- this.sendInvite(
- {
- instanceId: L.tag,
- worldId: L.tag,
- worldName: args1.ref.name,
- rsvp: true
- },
- ref.senderUserId
- ).then((_args) => {
- $app.$message(`Auto invite sent to ${ref.senderUsername}`);
- return _args;
+ if (!this.checkCanInvite(currentLocation))
+ return;
+
+ var L = this.parseLocation(currentLocation);
+
+ try {
+ this.getCachedWorld({
+ worldId: L.worldId
+ }).then((args1) => {
+ this.sendInvite(
+ {
+ instanceId: L.tag,
+ worldId: L.tag,
+ worldName: args1.ref.name,
+ rsvp: true
+ },
+ ref.senderUserId
+ ).then((_args) => {
+ $app.$message(`Auto invite sent to ${ref.senderUsername}`);
+ return _args;
+ });
});
- });
+ } catch (err) {
+ console.error(err);
+ }
});
$app.data.unseenNotifications = [];