Visitar URL original
Fix TypeError when importing JSON graph without settings property (#3… · ArcadeData/arcadedb@bd45606 · GitHub
Skip to content

Commit bd45606

Browse files
Copilotlvca
andauthored
Fix TypeError when importing JSON graph without settings property (#3100)
* Initial plan * Fix JSON graph import TypeError when settings property is missing Co-authored-by: lvca <312606+lvca@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lvca <312606+lvca@users.noreply.github.com>
1 parent e313118 commit bd45606

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎studio/src/main/resources/static/js/studio-graph.js‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,14 @@ function importGraph(format) {
6868
case "json":
6969
globalResultset = JSON.parse($("#importContent").val());
7070

71-
globalGraphSettings = globalResultset.settings;
72-
delete globalResultset.settings;
71+
if (globalResultset.settings) {
72+
globalGraphSettings = globalResultset.settings;
73+
delete globalResultset.settings;
74+
}
7375

7476
renderGraph();
7577
break;
7678
}
77-
renderGraph();
7879
$("#popup").modal("hide");
7980
});
8081

0 commit comments

Comments
 (0)