aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2023-10-08 03:49:00 +0200
committerVendicated <vendicated@riseup.net>2023-10-08 03:49:00 +0200
commitc33d59b45dc2e63ff80ce02287415f8973d90841 (patch)
treeae2de1f7ab76b9eec19502cf3729c887a97cbca7 /src
parentac1b67ccbdf0f46fe9d18a0a5ef4145d494b879f (diff)
downloadVencord-c33d59b45dc2e63ff80ce02287415f8973d90841.tar.gz
Vencord-c33d59b45dc2e63ff80ce02287415f8973d90841.tar.bz2
Vencord-c33d59b45dc2e63ff80ce02287415f8973d90841.zip
serverProfile: fix crash with lurked guilds
Co-authored-by: aamiaa <9750071+aamiaa@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/serverProfile/GuildProfileModal.tsx2
-rw-r--r--src/plugins/serverProfile/index.tsx2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/serverProfile/GuildProfileModal.tsx b/src/plugins/serverProfile/GuildProfileModal.tsx
index 79b3877..2be9b57 100644
--- a/src/plugins/serverProfile/GuildProfileModal.tsx
+++ b/src/plugins/serverProfile/GuildProfileModal.tsx
@@ -170,7 +170,7 @@ function ServerInfoTab({ guild }: GuildProps) {
const Fields = {
"Server Owner": owner ? Owner(guild.id, owner) : "Loading...",
"Created At": renderTimestamp(SnowflakeUtils.extractTimestamp(guild.id)),
- "Joined At": renderTimestamp(guild.joinedAt.getTime()),
+ "Joined At": guild.joinedAt ? renderTimestamp(guild.joinedAt.getTime()) : "-", // Not available in lurked guild
"Vanity Link": guild.vanityURLCode ? (<a>{`discord.gg/${guild.vanityURLCode}`}</a>) : "-", // Making the anchor href valid would cause Discord to reload
"Preferred Locale": guild.preferredLocale || "-",
"Verification Level": ["None", "Low", "Medium", "High", "Highest"][guild.verificationLevel] || "?",
diff --git a/src/plugins/serverProfile/index.tsx b/src/plugins/serverProfile/index.tsx
index c27f8cd..68f6193 100644
--- a/src/plugins/serverProfile/index.tsx
+++ b/src/plugins/serverProfile/index.tsx
@@ -18,7 +18,7 @@ const Patch: NavContextMenuPatchCallback = (children, { guild }: { guild: Guild;
group?.push(
<Menu.MenuItem
id="vc-server-profile"
- label="Server Profile"
+ label="Server Info"
action={() => openGuildProfileModal(guild)}
/>
);