Skip to content

Commit 8e5f90c

Browse files
committed
fix: make documentationLink optional and handle potential undefined scopes
1 parent 867c9e1 commit 8e5f90c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/vscode-extension/src/scopes.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export type ScopeClassification =
3030
type Api = {
3131
title: string;
3232
version: string | number | null;
33-
documentationLink: string;
33+
documentationLink?: string;
3434
};
3535

3636
type Scope = {
@@ -41,8 +41,8 @@ type Scope = {
4141

4242
export const SCOPES = new Map<string, Scope>();
4343

44-
for (const { title, version, documentationLink, scopes } of GOOGLE_APIS) {
45-
for (const { id, description } of scopes) {
44+
for (const { title, version, documentationLink, scopes } of GOOGLE_APIS || []) {
45+
for (const { id, description } of scopes || []) {
4646
console.log(
4747
`Processing scope: ${id} - ${description} (${title} v${version})`,
4848
);

0 commit comments

Comments
 (0)