fx-compat: Avoid dead object errors in note-editor

Fixes #2663
This commit is contained in:
Martynas Bagdonas 2022-06-20 11:33:10 +03:00
parent b3077182d2
commit 5b879f75c5

View file

@ -501,6 +501,7 @@ class EditorInstance {
}
case 'subscribe': {
let { subscription } = message;
subscription = JSON.parse(JSON.stringify(subscription));
this._subscriptions.push(subscription);
if (subscription.type === 'image') {
await this._feedSubscription(subscription);
@ -515,6 +516,7 @@ class EditorInstance {
// Called on note editor load
case 'updateCitationItemsList': {
let { list } = message;
list = list.slice();
let newList = [];
for (let item of list) {
let existingItem = this._citationItemsList