diff --git a/back/methods/edi/syncData.js b/back/methods/edi/syncData.js index 802e4911e4..36c527aaa2 100644 --- a/back/methods/edi/syncData.js +++ b/back/methods/edi/syncData.js @@ -58,8 +58,8 @@ module.exports = Self => { } } catch (e) { if (tx) await tx.rollback(); - if (await fs.pathExists(ws.path)) - await fs.remove(ws.path); + if (await fs.pathExists(ws?.path)) + await fs.remove(ws?.path); throw e; } };