Permalink
Browse files

Merge pull request #161 from LancerComet/hotfix/compare

+ Param for String.localeCompare should be a string.
  • Loading branch information...
hotoo committed Sep 30, 2017
2 parents 7407b65 + f4a9fdf commit d245b1284ea3b3c6a29e212efe7525243a7e4bcd
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/pinyin.js
View
@@ -181,7 +181,7 @@ class Pinyin {
compare (hanA, hanB) {
const pinyinA = this.convert(hanA, DEFAULT_OPTIONS);
const pinyinB = this.convert(hanB, DEFAULT_OPTIONS);
return String(pinyinA).localeCompare(pinyinB);
return String(pinyinA).localeCompare(String(pinyinB));
}
static get STYLE_NORMAL () {

0 comments on commit d245b12

Please sign in to comment.