Fix QR breaking when no sets

This commit is contained in:
Cohee 2024-06-23 01:34:10 +03:00
parent de1910268a
commit 323f34f5d4
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ export class SettingsUi {
this.onQrSetChange(); this.onQrSetChange();
} }
onQrSetChange() { onQrSetChange() {
this.currentQrSet = QuickReplySet.get(this.currentSet.value); this.currentQrSet = QuickReplySet.get(this.currentSet.value) ?? new QuickReplySet();
this.disableSend.checked = this.currentQrSet.disableSend; this.disableSend.checked = this.currentQrSet.disableSend;
this.placeBeforeInput.checked = this.currentQrSet.placeBeforeInput; this.placeBeforeInput.checked = this.currentQrSet.placeBeforeInput;
this.injectInput.checked = this.currentQrSet.injectInput; this.injectInput.checked = this.currentQrSet.injectInput;