Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"scripts": {
"start": "react-scripts start",
"build": "rm -rf build && tsc -p tsconfig-npm.json",
"watch": "rm -rf build && tsc -w -p tsconfig-npm.json",
"test": "react-scripts test",
"eject": "react-scripts eject",
"version:patch": "npm run version:pre && npm run version:changelog && npm version patch && npm run version:post",
Expand Down
4 changes: 2 additions & 2 deletions src/utils/useDocumentLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const useDocumentLoader = (): {
);

useEffect(() => {
if (!currentDocument || CurrentRenderer === undefined) return;
if (!currentDocument || currentDocument.fileData || CurrentRenderer === undefined) return;

const controller = new AbortController();
const { signal } = controller;
Expand Down Expand Up @@ -88,7 +88,7 @@ export const useDocumentLoader = (): {
return () => {
controller.abort();
};
}, [CurrentRenderer]);
}, [CurrentRenderer, currentDocument?.fileData]);

return { state, dispatch, CurrentRenderer };
};