mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-22 05:50:01 +00:00
Fix removing a field with empty name (#6888)
* allow us to remove a field with empty key * fix typo in if clause
This commit is contained in:
parent
d7b9e6fb02
commit
2ff5bd5a0f
@ -36,7 +36,7 @@ Compute the internal state of the widget
|
||||
*/
|
||||
DeleteFieldWidget.prototype.execute = function() {
|
||||
this.actionTiddler = this.getAttribute("$tiddler",this.getVariable("currentTiddler"));
|
||||
this.actionField = this.getAttribute("$field");
|
||||
this.actionField = this.getAttribute("$field",null);
|
||||
};
|
||||
|
||||
/*
|
||||
@ -59,7 +59,7 @@ DeleteFieldWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
||||
tiddler = this.wiki.getTiddler(self.actionTiddler),
|
||||
removeFields = {},
|
||||
hasChanged = false;
|
||||
if(this.actionField && tiddler) {
|
||||
if((this.actionField !== null) && tiddler) {
|
||||
removeFields[this.actionField] = undefined;
|
||||
if(this.actionField in tiddler.fields) {
|
||||
hasChanged = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user