Only update modified field if we actually delete a field

…in the <$action-deletefield /> widget.

Fixes a bug where <$action-deletefield foo /> would update the modified field
if the "foo" field wasn't present on a tiddler.
This commit is contained in:
Rob Hoelz 2024-03-28 07:32:12 -05:00
parent 8c4aeca4b7
commit 9bb5fd0190
1 changed files with 3 additions and 1 deletions

View File

@ -69,7 +69,9 @@ DeleteFieldWidget.prototype.invokeAction = function(triggeringWidget,event) {
$tw.utils.each(this.attributes,function(attribute,name) {
if(name.charAt(0) !== "$" && name !== "title") {
removeFields[name] = undefined;
hasChanged = true;
if(name in tiddler.fields) {
hasChanged = true;
}
}
});
if(hasChanged) {