Skip to content

fix(hmr): remove redundant condition check#5828

Merged
chenjiahan merged 1 commit intomainfrom
hmr_check_0813
Aug 13, 2025
Merged

fix(hmr): remove redundant condition check#5828
chenjiahan merged 1 commit intomainfrom
hmr_check_0813

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

Remove redundant condition check in the handleSuccess method since tryApplyUpdates() already checks for updates.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings August 13, 2025 05:34
@netlify
Copy link
Copy Markdown

netlify bot commented Aug 13, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 180c0ca
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/689c23d8fbf27f000879bc7e
😎 Deploy Preview https://deploy-preview-5828--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 68 (🔴 down 5 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes redundant condition checks in the Hot Module Replacement (HMR) client code to improve code maintainability. The change eliminates an unnecessary isUpdateAvailable() check since the tryApplyUpdates() function already performs this validation internally.

  • Removed redundant isUpdateAvailable() condition in handleApplyUpdates function
  • Simplified control flow by relying on existing validation in tryApplyUpdates()

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@chenjiahan chenjiahan merged commit 0bdbcfa into main Aug 13, 2025
12 checks passed
@chenjiahan chenjiahan deleted the hmr_check_0813 branch August 13, 2025 05:40
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.

2 participants