mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Fix problem with checking versions of plugins carrying a badly formatted "version" field
This commit is contained in:
parent
ebc77fbd09
commit
24b6603c42
@ -357,8 +357,13 @@ $tw.utils.parseVersion = function(version) {
|
|||||||
Returns true if the version string A is greater than the version string B
|
Returns true if the version string A is greater than the version string B
|
||||||
*/
|
*/
|
||||||
$tw.utils.checkVersions = function(versionStringA,versionStringB) {
|
$tw.utils.checkVersions = function(versionStringA,versionStringB) {
|
||||||
var versionA = $tw.utils.parseVersion(versionStringA),
|
var defaultVersion = {
|
||||||
versionB = $tw.utils.parseVersion(versionStringB),
|
major: 0,
|
||||||
|
minor: 0,
|
||||||
|
patch: 0
|
||||||
|
},
|
||||||
|
versionA = $tw.utils.parseVersion(versionStringA) || defaultVersion,
|
||||||
|
versionB = $tw.utils.parseVersion(versionStringB) || defaultVersion,
|
||||||
diff = [
|
diff = [
|
||||||
versionA.major - versionB.major,
|
versionA.major - versionB.major,
|
||||||
versionA.minor - versionB.minor,
|
versionA.minor - versionB.minor,
|
||||||
|
Loading…
Reference in New Issue
Block a user