mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-06-25 23:03:15 +00:00
fixed bug in $action-setfield introduced by #1963: At least one of '$field', '$value' or '$index' must be specified in order to act upon the information from the fields. Prevents default deletion of the 'text' field when none are specified.
This commit is contained in:
parent
6107bbfd6e
commit
99c5fa46dd
|
@ -61,7 +61,9 @@ SetFieldWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
||||||
var self = this,
|
var self = this,
|
||||||
options = {};
|
options = {};
|
||||||
options.suppressTimestamp = !this.actionTimestamp;
|
options.suppressTimestamp = !this.actionTimestamp;
|
||||||
this.wiki.setText(this.actionTiddler,this.actionField,this.actionIndex,this.actionValue,options);
|
if((typeof this.actionField == "string") || (typeof this.actionIndex == "string") || (typeof this.actionValue == "string")) {
|
||||||
|
this.wiki.setText(this.actionTiddler,this.actionField,this.actionIndex,this.actionValue,options);
|
||||||
|
}
|
||||||
$tw.utils.each(this.attributes,function(attribute,name) {
|
$tw.utils.each(this.attributes,function(attribute,name) {
|
||||||
if(name.charAt(0) !== "$") {
|
if(name.charAt(0) !== "$") {
|
||||||
self.wiki.setText(self.actionTiddler,name,undefined,attribute,options);
|
self.wiki.setText(self.actionTiddler,name,undefined,attribute,options);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user