Use numbers when comparing versions

pull/17/head
Frode Petterson 2016-04-04 12:39:57 +02:00
parent cdfab4d4b6
commit 0c5971d6d4
2 changed files with 3 additions and 2 deletions

View File

@ -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();

View File

@ -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.