1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

Fix problem with tm-add-field for existing fields

Fixes #1197
This commit is contained in:
Jermolene 2014-12-05 10:20:25 +00:00
parent 9c77f1bac6
commit 0e62d8f648

View File

@ -76,7 +76,6 @@ FieldManglerWidget.prototype.handleAddFieldEvent = function(event) {
hadInvalidFieldName = false,
addField = function(name,value) {
var trimmedName = name.toLowerCase().trim();
debugger;
if(!$tw.utils.isValidFieldName(trimmedName)) {
if(!hadInvalidFieldName) {
alert($tw.language.getString(
@ -89,6 +88,9 @@ FieldManglerWidget.prototype.handleAddFieldEvent = function(event) {
return;
}
} else {
if(!value && tiddler) {
value = tiddler.fields[trimmedName];
}
addition[trimmedName] = value || "";
}
return;