Skip to content

Commit

Permalink
fix: Fix Job#getQueryResultsStream when using startIndex (#1100)
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-d committed Apr 29, 2022
1 parent de34bc6 commit 2b7df52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/job.ts
Expand Up @@ -566,7 +566,7 @@ class Job extends Operation {
);
}

let nextQuery: {} | null = null;
let nextQuery: QueryResultsOptions | null = null;
if (resp.jobComplete === false) {
// Query is still running.
nextQuery = Object.assign({}, options);
Expand All @@ -584,6 +584,7 @@ class Job extends Operation {
nextQuery = Object.assign({}, options, {
pageToken: resp.pageToken,
});
delete nextQuery.startIndex;
}

callback!(null, rows, nextQuery, resp);
Expand Down

0 comments on commit 2b7df52

Please sign in to comment.