diff --git a/docs/.vitepress/imgit/plugin/youtube.ts b/docs/.vitepress/imgit/plugin/youtube.ts index d70e99ff7..c915b0494 100644 --- a/docs/.vitepress/imgit/plugin/youtube.ts +++ b/docs/.vitepress/imgit/plugin/youtube.ts @@ -48,7 +48,7 @@ function build(asset: BuiltAsset): boolean { } async function resolveThumbnailUrl(id: string): Promise { - if ((cache).youtube.hasOwnProperty(id)) + if ((cache).youtube?.hasOwnProperty(id)) return (cache).youtube[id]; let response: Response; for (const variant of thumbs)