mirror of
https://github.com/Equicord/Equicord.git
synced 2025-02-24 09:09:12 -05:00
Fix Crashing
This commit is contained in:
parent
d77fd04a64
commit
0ba61b1c7a
1 changed files with 2 additions and 3 deletions
|
@ -47,7 +47,7 @@ const userContextMenuPatch: NavContextMenuPatchCallback = (children, { user }: {
|
||||||
};
|
};
|
||||||
|
|
||||||
export function getCustomColorString(userId: string, withHash?: boolean): string | undefined {
|
export function getCustomColorString(userId: string, withHash?: boolean): string | undefined {
|
||||||
if (!colors[userId] || !Settings.plugins.customUserColors.enabled)
|
if (!colors[userId] || !Settings.plugins.CustomUserColors.enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (withHash)
|
if (withHash)
|
||||||
|
@ -110,8 +110,7 @@ export default definePlugin({
|
||||||
colorIfServer(a: any): string | undefined {
|
colorIfServer(a: any): string | undefined {
|
||||||
const roleColor = a.author.colorString;
|
const roleColor = a.author.colorString;
|
||||||
|
|
||||||
if (a.channel.guild_id && !settings.store.colorInServers)
|
if (a.channel.guild_id && !settings.store.colorInServers) return roleColor;
|
||||||
return roleColor;
|
|
||||||
|
|
||||||
const color = getCustomColorString(a.message.author.id, true);
|
const color = getCustomColorString(a.message.author.id, true);
|
||||||
return color ?? roleColor;
|
return color ?? roleColor;
|
||||||
|
|
Loading…
Add table
Reference in a new issue