diff options
author | Nuckyz <61953774+Nuckyz@users.noreply.github.com> | 2023-05-16 11:53:17 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-16 14:53:17 +0000 |
commit | 235000cf415b30b666bde41cf95f9d7d696f1a8c (patch) | |
tree | 3d736bddb34f03f1bb4928495b751d2280b5d0ef /src | |
parent | 263884cbd86326ed48a6b69c937ff35dec2d529b (diff) | |
download | Vencord-235000cf415b30b666bde41cf95f9d7d696f1a8c.tar.gz Vencord-235000cf415b30b666bde41cf95f9d7d696f1a8c.tar.bz2 Vencord-235000cf415b30b666bde41cf95f9d7d696f1a8c.zip |
Fix handleProtoChange erroring when userSettingsProto is undefined (#1150)
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/fakeNitro.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/fakeNitro.tsx b/src/plugins/fakeNitro.tsx index 52a9d25..b48a466 100644 --- a/src/plugins/fakeNitro.tsx +++ b/src/plugins/fakeNitro.tsx @@ -321,7 +321,7 @@ export default definePlugin({ }, handleProtoChange(proto: any, user: any) { - if ((!proto.appearance && !AppearanceSettingsProto) || !UserSettingsProtoStore) return; + if (proto == null || typeof proto === "string" || !UserSettingsProtoStore || (!proto.appearance && !AppearanceSettingsProto)) return; const premiumType: number = user?.premium_type ?? UserStore?.getCurrentUser()?.premiumType ?? 0; |