From e00534635edbf87535bee06be9adb130c8320bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20K=C3=BCppers?= Date: Fri, 19 Dec 2014 19:24:13 +0100 Subject: [PATCH] Update boot.js --- boot/boot.js | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index fe34f2734..3f653ca79 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -362,21 +362,24 @@ Returns true if the version string A is greater than the version string B. Retur */ $tw.utils.checkVersions = function(versionStringA,versionStringB) { var defaultVersion = { - major: 0, - minor: 0, - patch: 0 - }, - versionA = $tw.utils.parseVersion(versionStringA) || defaultVersion, - versionB = $tw.utils.parseVersion(versionStringB) || defaultVersion, - diff = [ - versionA.major - versionB.major, - versionA.minor - versionB.minor, - versionA.patch - versionB.patch - ]; + major: 0, + minor: 0, + patch: 0, + build: 0 + }, + versionA = $tw.utils.parseVersion(versionStringA) || defaultVersion, + versionB = $tw.utils.parseVersion(versionStringB) || defaultVersion, + diff = [ + versionA.major - versionB.major, + versionA.minor - versionB.minor, + versionA.patch - versionB.patch, + versionA.build - versionB.build + ]; return (diff[0] > 0) || (diff[0] === 0 && diff[1] > 0) || (diff[0] === 0 && diff[1] === 0 && diff[2] > 0) || - (diff[0] === 0 && diff[1] === 0 && diff[2] === 0); + (diff[0] === 0 && diff[1] === 0 && diff[2] === 0 && diff[3] > 0) || + (diff[0] === 0 && diff[1] === 0 && diff[2] === 0 && diff[3] === 0); }; /* @@ -1966,4 +1969,4 @@ if(typeof(exports) !== "undefined") { exports.TiddlyWiki = _boot; } else { _boot(window.$tw); -} \ No newline at end of file +}