From 3fc40a18c9a7751db078c1b19fd4cce51b62563b Mon Sep 17 00:00:00 2001 From: Viki Val Date: Mon, 20 May 2024 15:34:58 +0200 Subject: [PATCH] Update parseImage.ts --- src/utils/parseImage.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/parseImage.ts b/src/utils/parseImage.ts index 451d7745..4e5223ee 100644 --- a/src/utils/parseImage.ts +++ b/src/utils/parseImage.ts @@ -54,7 +54,8 @@ export async function parseImage( ) if (node.tag === 'img') { const src = node.props.src - if (src.startsWith('/')) node.props.src = `${assetsUrl + parsePath(src)}` + const isPath = typeof src === 'string' && src.startsWith('/') + if (isPath) node.props.src = `${assetsUrl + parsePath(src)}` } return node