fix: check connection issues on load
This commit is contained in:
1 parent
a925548ae9
commit
f5a2c4365b
1 file changed
+7
@@ -115,6 +115,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($currentUser) {
|
if ($currentUser) {
|
||||||
|
try {
|
||||||
currentLoadingInfo.set('Loading user info...');
|
currentLoadingInfo.set('Loading user info...');
|
||||||
const userInfo = await ezppfarm.getUserInfo($currentUser.id);
|
const userInfo = await ezppfarm.getUserInfo($currentUser.id);
|
||||||
if (userInfo) {
|
if (userInfo) {
|
||||||
@@ -123,6 +124,12 @@
|
|||||||
preferredMode.set(userInfo.player.info.preferred_mode);
|
preferredMode.set(userInfo.player.info.preferred_mode);
|
||||||
preferredType.set(userInfo.player.info.preferred_type);
|
preferredType.set(userInfo.player.info.preferred_type);
|
||||||
}
|
}
|
||||||
|
} catch {
|
||||||
|
userLoginResult = {
|
||||||
|
message: 'There was an issue connecting to the server. Please try again later.',
|
||||||
|
};
|
||||||
|
currentUser.set(undefined);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$firstStartup) {
|
if (!$firstStartup) {
|
||||||
|
|||||||
Reference in new issue
Block a user