fix: Error type

This commit is contained in:
Sidharth Vinod
2022-11-25 13:23:42 +05:30
parent b7aae5f94f
commit 17ca5f29d0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ export interface State {
export interface ValidatedState extends State {
editorMode: EditorMode;
error: Error;
error?: Error;
errorMarkers: MarkerData[];
serialized: string;
}
+1 -1
View File
@@ -66,7 +66,7 @@ const processState = async (state: State) => {
await parse(state.code);
JSON.parse(state.mermaid);
} catch (e) {
processed.error = e;
processed.error = e as Error;
errorDebug();
console.error(e);
if ('hash' in e) {