Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
fix: Gracefully handle missing page cover
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer committed Jun 30, 2019
1 parent e32d148 commit 4eb1db0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/notion-blocks-to-rich-text-nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function getIcon(block) {
return get(block, 'value.format.page_icon');
}

function getImageSrc(url) {
function getImageSrc(url = '') {
const isHostedByNotion = url.startsWith('/images/');
return isHostedByNotion ? `https://notion.so${url}` : url;
}
Expand Down

0 comments on commit 4eb1db0

Please sign in to comment.