Skip to content

Commit

Permalink
fix: maxResults in getEntries looks broken (#1311)
Browse files Browse the repository at this point in the history
  • Loading branch information
losalex authored Aug 20, 2022
1 parent 01e1286 commit 208d994
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -592,12 +592,20 @@ class Logging {
}
delete reqOpts.autoPaginate;
delete reqOpts.gaxOptions;
const gaxOptions = extend(
let gaxOptions = extend(
{
autoPaginate: options!.autoPaginate,
},
options!.gaxOptions
);
if (options?.maxResults) {
gaxOptions = extend(
{
maxResults: options.maxResults,
},
gaxOptions
);
}
const resp = await this.loggingService.listLogEntries(reqOpts, gaxOptions);
const [entries] = resp;
if (entries) {
Expand Down

0 comments on commit 208d994

Please sign in to comment.