We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
源码中的版本比较是
versions.sort((a, b) => semver.gt(b, a))
这么比较是存在问题的,semver.gt返回的boolean类型的true和false,而sort函数规定的确是数字: 大于0:b置换a 等于0:a与b位置不变 小于0:a置换b 这种比较只会发生b置换a,但却没有a置换b的场景,导致版本比较失败。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
源码中的版本比较是
这么比较是存在问题的,semver.gt返回的boolean类型的true和false,而sort函数规定的确是数字:
大于0:b置换a
等于0:a与b位置不变
小于0:a置换b
这种比较只会发生b置换a,但却没有a置换b的场景,导致版本比较失败。
The text was updated successfully, but these errors were encountered: