diff --git a/mindplot/src/main/javascript/StandaloneActionDispatcher.js b/mindplot/src/main/javascript/StandaloneActionDispatcher.js index b28dcea8..05dd2136 100644 --- a/mindplot/src/main/javascript/StandaloneActionDispatcher.js +++ b/mindplot/src/main/javascript/StandaloneActionDispatcher.js @@ -242,9 +242,12 @@ mindplot.CommandContext = new Class({ } var designerTopics = this._designer.getModel().getTopics(); - return designerTopics.filter(function (topic) { + var result = designerTopics.filter(function (topic) { return topicsIds.contains(topic.getId()); }); + + $assert(result.length == topicsIds.length, "Could not find topic. Result:" + result + ", Filtered:" + topicsIds + ", Current Topics: " + designerTopics); + return result; }, deleteTopic:function (topic) { diff --git a/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java b/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java index e030ec2a..eb096107 100755 --- a/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java +++ b/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java @@ -341,7 +341,7 @@ public class FreemindImporter * 3 -> 2 * 4 -> 4 */ - private int calcFirstLevelOrder(@NotNull List freeChilden, @NotNull Node freeChild) { + private int calcFirstLevelOrder(@NotNull List freeChilden, @Nullable Node freeChild) { final List nodes = new ArrayList(); int result;