Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

Commit 208d994

Browse files
authored
fix: maxResults in getEntries looks broken (#1311)
1 parent 01e1286 commit 208d994

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/index.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,12 +592,20 @@ class Logging {
592592
}
593593
delete reqOpts.autoPaginate;
594594
delete reqOpts.gaxOptions;
595-
const gaxOptions = extend(
595+
let gaxOptions = extend(
596596
{
597597
autoPaginate: options!.autoPaginate,
598598
},
599599
options!.gaxOptions
600600
);
601+
if (options?.maxResults) {
602+
gaxOptions = extend(
603+
{
604+
maxResults: options.maxResults,
605+
},
606+
gaxOptions
607+
);
608+
}
601609
const resp = await this.loggingService.listLogEntries(reqOpts, gaxOptions);
602610
const [entries] = resp;
603611
if (entries) {

0 commit comments

Comments
 (0)