mirror of https://github.com/calzoneman/sync.git
Explicit type conversion in version number comparison.
This commit is contained in:
parent
aa5066762b
commit
6a0608bf7e
|
@ -3247,11 +3247,15 @@ function maybePromptToUpgradeUserscript() {
|
|||
return;
|
||||
}
|
||||
|
||||
var currentVersion = GS_VERSION.toString().split('.'); // data.js
|
||||
var currentVersion = GS_VERSION.toString(); // data.js
|
||||
var userscriptVersion = window.driveUserscriptVersion;
|
||||
if (!userscriptVersion) {
|
||||
userscriptVersion = '1.0';
|
||||
}
|
||||
|
||||
currentVersion = currentVersion.split('.').map(function (part) {
|
||||
return parseInt(part, 10);
|
||||
});
|
||||
userscriptVersion = userscriptVersion.split('.').map(function (part) {
|
||||
return parseInt(part, 10);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue