diff --git a/packages/nc-gui/composables/useViewData.ts b/packages/nc-gui/composables/useViewData.ts index 0667742671..34bb78db9b 100644 --- a/packages/nc-gui/composables/useViewData.ts +++ b/packages/nc-gui/composables/useViewData.ts @@ -611,6 +611,11 @@ export function useViewData( .map((c) => row.row[c.title!]) .join('___') + const deleted = await deleteRowById(id as string) + if (!deleted) { + return + } + if (!undo) { addUndo({ redo: { @@ -648,11 +653,6 @@ export function useViewData( scope: defineViewScope({ view: viewMeta.value }), }) } - - const deleted = await deleteRowById(id as string) - if (!deleted) { - return - } } formattedData.value.splice(rowIndex, 1)