Skip to content

Commit

Permalink
fix: imageSize=0无效 (#2937)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicks6666 authored Jan 15, 2025
1 parent 2571c8d commit 52f39ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/packages/empty/empty.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const Empty: FunctionComponent<

useEffect(() => {
setImgStyle(() => {
if (!imageSize) {
if (typeof imageSize !== 'number' && typeof imageSize !== 'string') {
return {}
}
if (typeof imageSize === 'number') {
Expand Down
2 changes: 1 addition & 1 deletion src/packages/empty/empty.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const Empty: FunctionComponent<

useEffect(() => {
setImgStyle(() => {
if (!imageSize) {
if (typeof imageSize !== 'number' && typeof imageSize !== 'string') {
return {}
}
if (typeof imageSize === 'number') {
Expand Down

0 comments on commit 52f39ac

Please sign in to comment.