Skip to content

Commit f2ce0ac

Browse files
committed
remove unimportant logs from fileBrowser.jsx , fileEdit.jsx , 5-load-save.js
1 parent b0aaf16 commit f2ce0ac

3 files changed

Lines changed: 4 additions & 12 deletions

File tree

src/component/fileBrowser.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,7 @@ const LocalFileBrowser = ({ superState, dispatcher }) => {
126126
const fileObj = await fileHandle.getFile();
127127
readFile(superState, dispatcher, fileObj, fileHandle);
128128
} catch (error) {
129-
if (error.name !== 'AbortError') {
130-
// console.error(error);
131-
}
129+
// AbortError is silently ignored (user cancelled)
132130
}
133131
};
134132

src/component/modals/FileEdit.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ const FileEditModal = ({ superState, dispatcher }) => {
5555
}]);
5656
dispatcher({ type: T.SET_FILE_STATE, payload: fS });
5757
} catch (error) {
58-
if (error.name !== 'AbortError') {
59-
// console.error(error);
60-
}
58+
// AbortError is silently ignored (user cancelled)
6159
}
6260
}
6361

src/graph-builder/graph-core/5-load-save.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,7 @@ class GraphLoadSave extends GraphUndoRedo {
134134
this.dispatcher({ type: T.SET_FILE_STATE, payload: fS });
135135
toast.success('File saved Successfully');
136136
} catch (error) {
137-
if (error.name !== 'AbortError') {
138-
// console.error(error);
139-
}
137+
// AbortError is silently ignored (user cancelled)
140138
}
141139
} else {
142140
// eslint-disable-next-line no-alert
@@ -176,9 +174,7 @@ class GraphLoadSave extends GraphUndoRedo {
176174
await stream.close();
177175
toast.success('File saved Successfully');
178176
} catch (error) {
179-
if (error.name !== 'AbortError') {
180-
// console.error(error);
181-
}
177+
// AbortError is silently ignored (user cancelled)
182178
}
183179
}
184180

0 commit comments

Comments
 (0)