Skip to content

Commit f88bb00

Browse files
authored
Merge pull request #1799 from tangly1024/fix/img-cover-4-bookmark
修复书签预览图无法展示的问题
2 parents ccf861b + fc7d14d commit f88bb00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/notion/mapImage.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ const mapImgUrl = (img, block, type = 'block', from) => {
2121
}
2222

2323
// Notion 图床转换为永久地址
24-
const isNotionImg = ret.indexOf('secure.notion-static.com') > 0 || ret.indexOf('prod-files-secure') > 0
24+
const isNotionSignImg = ret.indexOf('https://www.notion.so/image') !== 0 && (ret.indexOf('secure.notion-static.com') > 0 || ret.indexOf('prod-files-secure') > 0)
2525
const isImgBlock = BLOG.IMG_URL_TYPE === 'Notion' || type !== 'block'
26-
if (isNotionImg && isImgBlock) {
26+
if (isNotionSignImg && isImgBlock) {
2727
ret = BLOG.NOTION_HOST + '/image/' + encodeURIComponent(ret) + '?table=' + type + '&id=' + block.id
2828
}
2929

0 commit comments

Comments
 (0)