avoid fetch data already retrieved (last declaration) again and again

This commit is contained in:
Schoumi 2019-07-23 15:36:09 +02:00
parent 9f59097c07
commit 8279392d37

View file

@ -171,6 +171,7 @@ async function getAllDeclaration(params, declarationList) {
if (exist) {
let lastSaved = declarationList.indexOf(accData.lastSaved)
if (lastSaved !== -1) lastPeriod = lastSaved
if (lastPeriod === 0) lastPeriod = -1
}
for (let i = lastPeriod; i >= 0; i--) {
try {