From 43f940acbba9bea24da64eade6e2ca486e286ed4 Mon Sep 17 00:00:00 2001 From: sunhao Date: Mon, 13 Jan 2025 11:41:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20imageSize=3D0=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/empty/empty.taro.tsx | 2 +- src/packages/empty/empty.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/packages/empty/empty.taro.tsx b/src/packages/empty/empty.taro.tsx index f37cdc1075..3d23f51170 100644 --- a/src/packages/empty/empty.taro.tsx +++ b/src/packages/empty/empty.taro.tsx @@ -69,7 +69,7 @@ export const Empty: FunctionComponent< useEffect(() => { setImgStyle(() => { - if (!imageSize) { + if (typeof imageSize !== 'number' && typeof imageSize !== 'string') { return {} } if (typeof imageSize === 'number') { diff --git a/src/packages/empty/empty.tsx b/src/packages/empty/empty.tsx index 6117a84344..662062f812 100644 --- a/src/packages/empty/empty.tsx +++ b/src/packages/empty/empty.tsx @@ -71,7 +71,7 @@ export const Empty: FunctionComponent< useEffect(() => { setImgStyle(() => { - if (!imageSize) { + if (typeof imageSize !== 'number' && typeof imageSize !== 'string') { return {} } if (typeof imageSize === 'number') {