File tree Expand file tree Collapse file tree
routes/[[lang=lang]]/live-photo Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -255,6 +255,10 @@ export class NinaClient {
255255 }
256256 return this . cachedLiveImage ;
257257 }
258+
259+ haveImage ( ) {
260+ return ! ! this . cachedLiveImage ;
261+ }
258262}
259263
260264export const nina = new NinaClient ( ) ;
Original file line number Diff line number Diff line change @@ -4,13 +4,11 @@ import type { PageServerLoad } from './$types';
44export const load = ( async ( { parent, url } ) => {
55 const data = await parent ( ) ;
66
7- const img = await nina . getLiveImage ( ) ;
8-
97 return {
108 meta : {
119 title : data . lang . live_photo . title ,
1210 description : data . lang . live_photo . description ,
13- image : img ? `${ url . origin } /api/live-image` : undefined
11+ image : nina . haveImage ( ) ? `${ url . origin } /api/live-image` : undefined
1412 }
1513 } ;
1614} ) satisfies PageServerLoad ;
You can’t perform that action at this time.
0 commit comments