Fix handleProtoChange erroring when userSettingsProto is undefined (#1150)
This commit is contained in:
parent
263884cbd8
commit
235000cf41
1 changed files with 1 additions and 1 deletions
|
@ -321,7 +321,7 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
|
|
||||||
handleProtoChange(proto: any, user: any) {
|
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;
|
const premiumType: number = user?.premium_type ?? UserStore?.getCurrentUser()?.premiumType ?? 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue