From 0c5971d6d49453ee708a147e03219a581211a9d3 Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Mon, 4 Apr 2016 12:39:57 +0200 Subject: [PATCH] Use numbers when comparing versions --- js/h5p-content-upgrade-process.js | 1 + js/h5p-version.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/js/h5p-content-upgrade-process.js b/js/h5p-content-upgrade-process.js index 8edc28d..1d886cc 100644 --- a/js/h5p-content-upgrade-process.js +++ b/js/h5p-content-upgrade-process.js @@ -100,6 +100,7 @@ H5P.ContentUpgradeProcess = (function (Version) { else { // Go through the minor versions for this major version asyncSerial(minors, function (minor, upgrade, nextMinor) { + minor =+ minor; if (minor <= oldVersion.minor || minor > newVersion.minor) { // Older than or equal to the current version or newer than the selected nextMinor(); diff --git a/js/h5p-version.js b/js/h5p-version.js index 605bc04..7089b5a 100644 --- a/js/h5p-version.js +++ b/js/h5p-version.js @@ -10,8 +10,8 @@ H5P.Version = (function () { var versionSplit = version.split('.', 3); // Public - this.major = versionSplit[0]; - this.minor = versionSplit[1]; + this.major =+ versionSplit[0]; + this.minor =+ versionSplit[1]; /** * Public. Custom string for this object.