Fix error setting node.

This commit is contained in:
Paulo Gustavo Veiga 2022-10-21 18:08:49 -07:00
parent 9b10a987f3
commit 2c8236e7c2

View File

@ -746,7 +746,8 @@ abstract class Topic extends NodeGraph {
const model = this.getModel(); const model = this.getModel();
const dispatcher = ActionDispatcher.getInstance(); const dispatcher = ActionDispatcher.getInstance();
const notes = model.findFeatureByType(TopicFeatureFactory.Note.id); const notes = model.findFeatureByType(TopicFeatureFactory.Note.id);
if (!$defined(value)) {
if (!$defined(value) && notes.length > 0) {
const featureId = notes[0].getId(); const featureId = notes[0].getId();
dispatcher.removeFeatureFromTopic(topicId, featureId); dispatcher.removeFeatureFromTopic(topicId, featureId);
} else if (notes.length > 0) { } else if (notes.length > 0) {