Skip to content

Commit ac14c9e

Browse files
author
Aleksandr Andrienko
authored
CHE-3181: Fix appearing 'Restore project structure' loader. (eclipse-che#3182)
Signed-off-by: Aleksandr Andrienko <aandrienko@codenvy.com>
1 parent 5fbaf3d commit ac14c9e

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerStateComponent.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,10 @@ public void loadState(@NotNull JsonObject state) {
9191
projectExplorer.showHiddenFiles(state.getBoolean(SHOW_HIDDEN_FILES));
9292
}
9393

94-
JsonArray paths;
94+
JsonArray paths = state.hasKey(PATH_PARAM_ID) ? state.getArray(PATH_PARAM_ID) : Json.createArray();
9595

96-
if (state.hasKey(PATH_PARAM_ID)) {
97-
paths = state.getArray(PATH_PARAM_ID);
98-
} else {
99-
paths = Json.createArray();
96+
if (paths.length() == 0) {
97+
return;
10098
}
10199

102100
Promise<Node> revealPromise = null;

0 commit comments

Comments
 (0)