Browse Source

Fix error double toDate and log error before breaking loop

tags/1.0.0-beta.3
Schoumi 10 months ago
parent
commit
1a7c3128fa
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/index.js

+ 1
- 1
src/index.js View File

@@ -179,6 +179,7 @@ async function getAllDeclaration(params, declarationList) {
accData.lastSaved = declarationList[i]
this.saveAccountData(accData, { merge: false })
} catch (error) {
log('error',error)
break
}
}
@@ -243,7 +244,6 @@ async function getDeclaration(params, periode) {
}
let year = 2000 + Math.floor(periode / 100)
bill.filename = '' + year + '-' + month + '.pdf'
bill.date = bill.date.toDate()
bill.filestream = await buildDeclarationPDF(data, periode)
return bill
}

Loading…
Cancel
Save