Skip to content

Commit

Permalink
fix: undefined in html
Browse files Browse the repository at this point in the history
  • Loading branch information
jrasm91 committed Dec 11, 2023
1 parent ce4fb99 commit 4c9b21c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/src/immich/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,20 @@ const render = (index: string, meta: OpenGraphTags) => {
<meta property="og:type" content="website" />
<meta property="og:title" content="${meta.title}" />
<meta property="og:description" content="${meta.description}" />
${meta.imageUrl && `<meta property="og:image" content="${meta.imageUrl}" />`}
${meta.imageUrl ? `<meta property="og:image" content="${meta.imageUrl}" />` : ''}
<!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="${meta.title}" />
<meta name="twitter:description" content="${meta.description}" />
${meta.imageUrl && `<meta name="twitter:image" content="${meta.imageUrl}" />`}`;
${meta.imageUrl ? `<meta name="twitter:image" content="${meta.imageUrl}" />` : ''}`;

return index.replace('<!-- metadata:tags -->', tags);
};

console.log('Here', render('<!-- metadata:tags -->', { title: 'title', description: 'description' }));

@Injectable()
export class AppService {
private logger = new Logger(AppService.name);
Expand Down

0 comments on commit 4c9b21c

Please sign in to comment.