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

文档版本号排序 bug #3

Open
yuzhigang33 opened this issue Mar 27, 2017 · 0 comments
Open

文档版本号排序 bug #3

yuzhigang33 opened this issue Mar 27, 2017 · 0 comments

Comments

@yuzhigang33
Copy link

 var versions = Object.keys(res);
    versions.sort(function (a, b) {
      if (a > b) {
        return -1;
      } else {
        return 1;
      }
    });

以上排序方式,存在 '2.1.8' > '2.1.10' 的问题

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

No branches or pull requests

1 participant