Skip to content

Commit

Permalink
fix: optional cover file url
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-Liendo committed Sep 3, 2023
1 parent aa19ca2 commit 83a155a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/utils/Notion/Notes/objectTransformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export function pageToNoteTransformer(note: NoteResponse): Note {
return {
id: note.id,
icon: note.icon,
cover: note.cover?.external?.url || note.cover.file?.url || null,
cover: note.cover?.external?.url || note.cover?.file?.url || null,
title: note.properties.name.title?.at(0)?.plain_text,
tags: note.properties.tags.multi_select || [],
description: note.properties.description.rich_text?.at(0)?.plain_text,
Expand Down

0 comments on commit 83a155a

Please sign in to comment.