Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

fix #332

AykutSarac660990f1f240
diff --git a/src/store/useFile.ts b/src/store/useFile.ts
index c18e3baf..eee3dbc3 100644
--- a/src/store/useFile.ts
+++ b/src/store/useFile.ts
@@ -103,11 +103,9 @@ const useFile = create<FileStates & JsonActions>()((set, get) => ({
const jsonStr = JSON.stringify(json, null, 2);
useGraph.getState().setGraph(jsonStr);
- return useJson.setState({ json: jsonStr, loading: false });
+ get().setContents({ contents: jsonStr });
} catch (error) {
get().clear();
- useJson.setState({ loading: false });
- useGraph.setState({ loading: false });
toast.error("Failed to fetch document from URL!");
}
},