diff options
author | suVene | 2008-12-28 21:57:21 +0000 |
---|---|---|
committer | suVene | 2008-12-28 21:57:21 +0000 |
commit | e3062a292274ec5e6a94b5ed6e955126e0b4e5f8 (patch) | |
tree | 5e8a51e3a8a126a012f087a0f64d1363f24e9f98 /pluginManager.js | |
parent | 6b77a1418152d1bd6d50239e2805679f0338c2d1 (diff) | |
download | vimperator-plugins-e3062a292274ec5e6a94b5ed6e955126e0b4e5f8.tar.bz2 |
数値としての比較にする.
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@27537 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'pluginManager.js')
-rw-r--r-- | pluginManager.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pluginManager.js b/pluginManager.js index fcf2be4..b92196f 100644 --- a/pluginManager.js +++ b/pluginManager.js @@ -235,6 +235,10 @@ function compVersion(a, b){ for (let [i, bv] in Iterator(b)) { var av = i < a.length ? a[i] : 0; if (av == bv) continue; + if (!isNaN(av) && !isNaN(bv)) { + av = parseInt(av); + bv = parseInt(bv); + } return av < bv ? -1 : 1; } return 0; |