From 8512e374fb2b55e902869823b011acaa1cf913ba Mon Sep 17 00:00:00 2001 From: WardPearce Date: Tue, 10 Sep 2024 17:11:55 +1200 Subject: [PATCH] Fix loading watch page if VITE_DEFAULT_DOWNLOAD_ENABLED not defined --- materialious/src/routes/(app)/watch/[slug]/+page.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/materialious/src/routes/(app)/watch/[slug]/+page.ts b/materialious/src/routes/(app)/watch/[slug]/+page.ts index 5ff39238..6e30867d 100644 --- a/materialious/src/routes/(app)/watch/[slug]/+page.ts +++ b/materialious/src/routes/(app)/watch/[slug]/+page.ts @@ -52,7 +52,11 @@ export async function load({ params, url }) { } let downloadQualitiesDash; - if (import.meta.env.VITE_DEFAULT_DOWNLOAD_ENABLED.toString() === 'true' && typeof video.hlsUrl === 'undefined' && get(playerDashStore)) { + if ( + typeof import.meta.env.VITE_DEFAULT_DOWNLOAD_ENABLED !== 'undefined' && + import.meta.env.VITE_DEFAULT_DOWNLOAD_ENABLED.toString() === 'true' && + typeof video.hlsUrl === 'undefined' && get(playerDashStore) + ) { downloadQualitiesDash = listCombinedQualities(video.dashUrl); }