Add workaround on upate text when node has been deleted.

This commit is contained in:
Paulo Gustavo Veiga 2022-03-06 07:27:28 -08:00
parent 2b4356d0de
commit 0329798f15

View File

@ -144,7 +144,13 @@ class MultilineTextEditor extends Events {
const topicId = this._topic.getId(); const topicId = this._topic.getId();
const actionDispatcher = ActionDispatcher.getInstance(); const actionDispatcher = ActionDispatcher.getInstance();
actionDispatcher.changeTextToTopic([topicId], text); try {
actionDispatcher.changeTextToTopic([topicId], text);
} catch (e) {
// Hack: For some reasom, editor seems to end up connexted to a deleted node.
// More research required.
console.error(`Text could not be update -> ${JSON.stringify(e)}`);
}
} }
} }