1
0
mirror of https://github.com/flarum/core.git synced 2025-08-06 08:27:42 +02:00

fix: unexpected subscription breaks rendering (#4150)

This commit is contained in:
Sami Mazouz
2025-01-03 14:17:45 +01:00
committed by GitHub
parent 6d1e90c969
commit 0c40e19cdf

View File

@@ -51,7 +51,7 @@ export default class SubscriptionMenu<CustomAttrs extends ISubscriptionMenuAttrs
const discussion = this.attrs.discussion;
const subscription = discussion.subscription();
const buttonAttrs = this.possibleButtonAttrs[subscription];
const buttonAttrs = this.possibleButtonAttrs[subscription ?? 'null'] ?? this.possibleButtonAttrs.null;
const preferences = app.session.user!.preferences()!;
const notifyEmail = preferences['notify_newPost_email'];