Skip to content

fix: prevent image preview for null/undefined image values - #5293

Open
dajiaohuang wants to merge 2 commits into
VisActor:developfrom
dajiaohuang:fix/5290-image-null-preview
Open

fix: prevent image preview for null/undefined image values#5293
dajiaohuang wants to merge 2 commits into
VisActor:developfrom
dajiaohuang:fix/5290-image-null-preview

Conversation

@dajiaohuang

Copy link
Copy Markdown
Contributor

Description

When image column cell value is null, undefined, or empty string, clicking the cell should not open the broken image preview dialog.

Root Cause

In media-click.ts, the image click handler did not check if the cell value was valid before creating the preview image. This caused broken images to be displayed when clicking on cells with null/undefined values.

Fix

Add a check for falsy cellValue before proceeding with the image preview.

Testing

  • Manual verification with the provided reproduction steps

Related Issue

Fixes #5290

When image column cell value is null, undefined, or empty string,
clicking the cell should not open the broken image preview dialog.

Fixes VisActor#5290
@fangsmile

Copy link
Copy Markdown
Contributor
image 建议把同类问题也处理下 @dajiaohuang

@dajiaohuang

Copy link
Copy Markdown
Contributor Author

已按建议把同类问题一起处理:音频和视频预览分支现在也会在空值时直接返回,提交为 fa8b80afd

同时新增了 image/audio/video 三类空值回归测试。验证结果:

  • 聚焦 Jest:3 passed
  • rushx compile:通过
  • Rush change file 校验:通过
  • 预推送 rush test --only tag:package:11 个包检查完成,全部通过(仅现有工具链警告)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 图片列,没有图片展示,点击查看大图展示了裂图

2 participants