There was an error while loading. Please reload this page.
1 parent c49c9bf commit 9ff4239Copy full SHA for 9ff4239
1 file changed
app/src/protyle/undo/index.ts
@@ -82,7 +82,15 @@ export class Undo {
82
if (ids.size === 0) {
83
return;
84
}
85
- const existResponse = await fetchSyncPost("/api/block/checkBlocksExist", {ids: Array.from(ids)});
+ let existResponse: IWebSocketData;
86
+ try {
87
+ existResponse = await fetchSyncPost("/api/block/checkBlocksExist", {ids: Array.from(ids)});
88
+ } catch (e) {
89
+ return;
90
+ }
91
+ if (!existResponse?.data) {
92
93
94
const replacements: [string, string][] = [];
95
ids.forEach(id => {
96
if (existResponse.data[id] === true) {
0 commit comments