Skip to content

Commit

Permalink
fix: missing data after try-fnally
Browse files Browse the repository at this point in the history
  • Loading branch information
LuXDAmore committed Oct 7, 2020
1 parent 9676472 commit 9f905f5
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ export default async function(
token
) {

let nextToken = null;

if( token ) {

params = str(
Expand Down Expand Up @@ -329,10 +331,8 @@ export default async function(
),
);

} finally {} // eslint-disable-line

// Check for NEXT pagination value
const nextToken = (
// Check for NEXT pagination value
nextToken = (
pathResponseToTheNextPaginationValue
? findValue(
pathResponseToTheNextPaginationValue,
Expand All @@ -349,11 +349,13 @@ export default async function(
10
) + step
)
)
;
)
;

if( ! nextToken || nextToken === lastPaginationValue || maxIterations <= count )
return value;

if( ! nextToken || nextToken === lastPaginationValue || maxIterations <= count )
return value;
} finally {} // eslint-disable-line

count ++;

Expand Down

0 comments on commit 9f905f5

Please sign in to comment.