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

Commit 35fd5de

Browse files
committed
revert and add comment
1 parent f8e2990 commit 35fd5de

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,10 +590,11 @@ class Logging {
590590
reqOpts.filter += ` AND ${timeFilter}`;
591591
}
592592

593+
this.projectId = await this.auth.getProjectId();
594+
const resourceName = 'projects/' + this.projectId;
593595
reqOpts.resourceNames = arrify(reqOpts.resourceNames!);
594596
if (reqOpts.resourceNames.length === 0) {
595-
this.projectId = await this.auth.getProjectId();
596-
const resourceName = 'projects/' + this.projectId;
597+
// If no resource names are provided, default to the current project.
597598
reqOpts.resourceNames.push(resourceName);
598599
}
599600
delete reqOpts.autoPaginate;

0 commit comments

Comments
 (0)