changes should be true when replyVM is not set and we set an entry

This commit is contained in:
Bruno Windels 2021-09-16 22:28:19 +02:00
parent ccc5aac025
commit bae8dc7dd7

View file

@ -25,7 +25,7 @@ export class ComposerViewModel extends ViewModel {
}
setReplyingTo(entry) {
const changed = this._replyVM?.id?.equals(entry?.asEventKey());
const changed = new Boolean(entry) !== new Boolean(this._replyVM) || !this._replyVM?.id.equals(entry.asEventKey());
if (changed) {
this._replyVM = this.disposeTracked(this._replyVM);
if (entry) {