mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-15 06:47:25 +00:00
Fix problems with $tw.utils.checkVersions()
Previous changes since 5.1.7 broke the documented semantics by no longer returning true when the versions match. It affected the upgrade process, making it impossible to upgrade to a later pre-release (ie where the version numbers in the upgrade.html match those in the file being upgraded). Also reviewed and updated the calls to checkVersions. @felixhayashi I think that this effectively reverts the change you original submitted. Are you OK with it?
This commit is contained in:
@@ -211,7 +211,7 @@ exports.importTiddler = function(tiddler) {
|
||||
// Check if we're dealing with a plugin
|
||||
if(tiddler && tiddler.hasField("plugin-type") && tiddler.hasField("version") && existingTiddler && existingTiddler.hasField("plugin-type") && existingTiddler.hasField("version")) {
|
||||
// Reject the incoming plugin if it is older
|
||||
if($tw.utils.checkVersions(existingTiddler.fields.version,tiddler.fields.version)) {
|
||||
if(!$tw.utils.checkVersions(tiddler.fields.version,existingTiddler.fields.version)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user