1
0
mirror of https://gitcode.com/github-mirrors/react-native-update-cli.git synced 2025-10-29 22:03:11 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Fix package selection logic to match by package name instead of version; improve error handling for package retrieval.

This commit is contained in:
sunny.ll
2025-09-10 17:11:12 +08:00
parent ac13464d4d
commit 917f99f2ab
2 changed files with 2 additions and 2 deletions

View File

@@ -232,7 +232,7 @@ export const packageCommands = {
if (!allPkgs) {
throw new Error(t('noPackagesFound', { appId }));
}
const selectedPackage = allPkgs.find((pkg) => pkg.version === packageVersion);
const selectedPackage = allPkgs.find((pkg) => pkg.name === packageVersion);
if (!selectedPackage) {
throw new Error(t('packageNotFound', { packageVersion }));
}