From 52f39ac65cda13ebb07b4925f2093b5802f3d6b7 Mon Sep 17 00:00:00 2001 From: nicks6666 Date: Wed, 15 Jan 2025 14:33:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20imageSize=3D0=E6=97=A0=E6=95=88=20(#2937?= =?UTF-8?q?)?= 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 f37cdc107..3d23f5117 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 6117a8434..662062f81 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') {