Skip to content

Commit 99814dc

Browse files
yanlin-taoangrave
authored andcommitted
fix deletion failure of inote
1 parent 1f769af commit 99814dc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/screens/EPub/epubSlice.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ const duplicateEPub = createAsyncThunk("epub/duplicateEPub",
219219
});
220220

221221
const deleteEPub = createAsyncThunk("epub/deleteEPub",
222-
async ({ ePubId }) => {
222+
async (payload) => {
223+
const ePubId = typeof payload === 'string' ? payload : payload?.ePubId;
223224
try {
224225
await api.deleteEPub(ePubId);
225226
window.close();

0 commit comments

Comments
 (0)