diff --git a/src/routes/[slug]/[[timestamp]]/download/+server.ts b/src/routes/[slug]/[[timestamp]]/download/+server.ts index b79febc..cb518a0 100644 --- a/src/routes/[slug]/[[timestamp]]/download/+server.ts +++ b/src/routes/[slug]/[[timestamp]]/download/+server.ts @@ -8,7 +8,7 @@ export const GET: RequestHandler = async ({ params, url }) => { try { const zipName = getZipName(params); const album = await getMetadata(zipName); - const allowDownload = album.allowDownload === false ? false : true; + const allowDownload = 'allowDownload' in album && album.allowDownload === false ? false : true; if (!allowDownload) { throw error(403, 'Forbidden'); }