Skip to content

Conversation

@UNIkeEN
Copy link
Owner

@UNIkeEN UNIkeEN commented Jan 7, 2026

Checklist

  • Changes have been tested locally and work as expected.
  • All tests in workflows pass successfully.
  • Documentation has been updated if necessary.
  • Code formatting and commit messages align with the project's conventions.
  • Comments have been added for any complex logic or functionality if possible.

This PR is a ..

  • 🆕 New feature
  • 🐞 Bug fix
  • 🛠 Refactoring
  • ⚡️ Performance improvement
  • 🌐 Internationalization
  • 📄 Documentation improvement
  • 🎨 Code style optimization
  • ❓ Other (Please specify below)

Related Issues

fix #1286
maybe 修好了 #1285 的一部份(但引入了新的 bug)

Description

  • Please insert your description here and provide info about the "what" this PR is solving.

Additional Context

  • Add any other relevant information or screenshots here.

Copy link
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
}, [selectedModLoader.loaderType]);
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

The useEffect dependency array is incomplete. The effect uses selectedOptiFine, selectedOptiFine.filename, and selectedModLoader.version, but only depends on selectedModLoader.loaderType.

This means when selectedModLoader.version or selectedOptiFine changes, the local state (selectedId and selectedType) won't be updated to reflect these changes. This could lead to UI inconsistencies where the displayed selection doesn't match the actual selected values.

Consider adding all used dependencies: [selectedModLoader.loaderType, selectedModLoader.version, selectedOptiFine]

Copilot uses AI. Check for mistakes.
@UNIkeEN UNIkeEN merged commit 0482298 into main Jan 7, 2026
14 checks passed
@UNIkeEN UNIkeEN deleted the fix/issue-1286 branch January 17, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 修改模组加载器 modal 版本检测失效

2 participants