Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(numfmt): numfmt skip null or undefined #3188

Merged
merged 1 commit into from
Aug 26, 2024
Merged

fix(numfmt): numfmt skip null or undefined #3188

merged 1 commit into from
Aug 26, 2024

Conversation

Gggpound
Copy link
Contributor

@Gggpound Gggpound commented Aug 26, 2024

close #2971

Pull Request Checklist

  • Related tickets or issues have been linked in the PR description (or missing issue).
  • Naming convention is followed (do please check it especially when you created new plugins, commands and resources).
  • Unit tests have been added for the changes (if applicable).
  • Breaking changes have been documented (or no breaking changes introduced in this PR).

@univer-bot univer-bot bot added the qa:untested This PR is ready to be tested label Aug 26, 2024
Copy link

github-actions bot commented Aug 26, 2024

View Deployment

📑 Examples 📚 Storybook
🔗 Preview link 🔗 Preview link

Copy link

codecov bot commented Aug 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.53%. Comparing base (0431c1f) to head (d513c4f).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #3188      +/-   ##
==========================================
- Coverage   28.53%   28.53%   -0.01%     
==========================================
  Files        2022     2022              
  Lines      106799   106799              
  Branches    23071    23071              
==========================================
- Hits        30479    30473       -6     
- Misses      76320    76326       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zhaolixin7 zhaolixin7 added the qa:verified This PR has already by verified by a QA and is considered good enough to be merge label Aug 26, 2024
@univer-bot univer-bot bot removed the qa:untested This PR is ready to be tested label Aug 26, 2024
@@ -81,7 +81,7 @@ export class SheetsNumfmtCellContentController extends Disposable {
}

// just handle number
if (originCellValue.t !== CellValueType.NUMBER) {
if (originCellValue.t !== CellValueType.NUMBER || originCellValue.v === undefined || originCellValue.v === null || Number.isNaN(originCellValue.v)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议使用 originCellValue.v == null

@Gggpound Gggpound merged commit a923a93 into dev Aug 26, 2024
13 checks passed
@Gggpound Gggpound deleted the fix-numfmt-0824 branch August 26, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qa:verified This PR has already by verified by a QA and is considered good enough to be merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] when using UniverSheetsNumfmtPlugin ,there is no need to format when the cell value is null
3 participants