Skip to content

Commit

Permalink
Improved: Removed extra spaces and simplified the if check in the fet…
Browse files Browse the repository at this point in the history
…chCycleCounts action (#531)
  • Loading branch information
R-Sourabh committed Dec 18, 2024
1 parent 57c6287 commit a428a1c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/store/modules/count/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ const actions: ActionTree<CountState, RootState> = {
}
total = resp.data.length
dispatch("fetchCycleCountStats", counts.map((count: any) => count.inventoryCountImportId))

// Determine if more data can be fetched
isScrollable = resp.data.length >= payload.pageSize
} else {
Expand All @@ -61,9 +60,7 @@ const actions: ActionTree<CountState, RootState> = {
}
} catch(err) {
isScrollable = false
if(payload.pageIndex == 0) {
counts = []
}
if(payload.pageIndex == 0) counts = []
logger.error(err)
}
commit(types.COUNT_LIST_UPDATED, { counts, total , isScrollable })
Expand Down

0 comments on commit a428a1c

Please sign in to comment.