diff --git a/src/content/github/common/fetchers.ts b/src/content/github/common/fetchers.ts index 8807c29..1f32cab 100644 --- a/src/content/github/common/fetchers.ts +++ b/src/content/github/common/fetchers.ts @@ -18,7 +18,7 @@ export async function getFlags(metadata: FileMetadata): Promise { referrer: window.location.href, }); - const flags = response.ok ? response.data.results : []; + const flags = response?.ok ? response.data.results : []; return flags.map((f: any) => f.flag_name); } @@ -35,7 +35,7 @@ export async function getComponents(metadata: FileMetadata): Promise { referrer: window.location.href, }); - const components = response.ok ? response.data : []; + const components = response?.ok ? response.data : []; return components.map((c: any) => c.component_id); }