Skip to content

Commit 130d0c3

Browse files
committed
added file.notion.so check for getPageImageUrls
1 parent aaa2402 commit 130d0c3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/notion-utils/src/get-page-image-urls.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ export const getPageImageUrls = (
2323
if (block) {
2424
if (block.type === 'image') {
2525
const signedUrl = recordMap.signed_urls?.[block.id]
26-
const source = signedUrl || block.properties?.source?.[0]?.[0]
26+
let source = signedUrl || block.properties?.source?.[0]?.[0]
27+
if (source.includes('file.notion.so')) {
28+
source = block.properties?.source?.[0]?.[0]
29+
}
2730

2831
if (source) {
2932
images.push({

0 commit comments

Comments
 (0)