mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Fix overeager alerts from core module overwrite upgrade warning
This fixes a bug in #3634, and refines the logic so that the warning is only given if the incoming tiddler exists as a shadow tiddler. (In my case I have several draft core modules inactive in my notes wiki and they were erroneously suppressed from the upgrade).
This commit is contained in:
parent
654eda02c6
commit
471b73158a
@ -35,17 +35,17 @@ exports.upgrade = function(wiki,titles,tiddlers) {
|
||||
}
|
||||
for(var t=0; t<WARN_IMPORT_PREFIX_LIST.length; t++) {
|
||||
var prefix = WARN_IMPORT_PREFIX_LIST[t];
|
||||
if(title.substr(0,prefix.length) === prefix) {
|
||||
if(title.substr(0,prefix.length) === prefix && wiki.isShadowTiddler(title)) {
|
||||
showAlert = true;
|
||||
messages[title] = $tw.language.getString("Import/Upgrader/System/Warning");
|
||||
}
|
||||
}
|
||||
}
|
||||
if(showAlert) {
|
||||
var logger = new $tw.utils.Logger("import");
|
||||
logger.alert($tw.language.getString("Import/Upgrader/System/Alert"));
|
||||
}
|
||||
});
|
||||
if(showAlert) {
|
||||
var logger = new $tw.utils.Logger("import");
|
||||
logger.alert($tw.language.getString("Import/Upgrader/System/Alert"));
|
||||
}
|
||||
return messages;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user