1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-16 15:28:24 +00:00

action-setfield shouldn't write to the current tiddler if the $tiddler attribute is present but has evaluated to a missing attribute

Fixes #5916
This commit is contained in:
Jeremy Ruston
2022-04-16 18:02:27 +01:00
committed by GitHub
parent eb0b2a8d8e
commit fd0b985ac5
3 changed files with 63 additions and 15 deletions

View File

@@ -289,12 +289,19 @@ Widget.prototype.computeAttribute = function(attribute) {
};
/*
Check for the presence of an attribute
Check for the presence of an evaluated attribute on the widget. Note that attributes set to a missing variable (ie attr=<<missing>>) will be treated as missing
*/
Widget.prototype.hasAttribute = function(name) {
return $tw.utils.hop(this.attributes,name);
};
/*
Check for the presence of a raw attribute on the widget parse tree node. Note that attributes set to a missing variable (ie attr=<<missing>>) will NOT be treated as missing
*/
Widget.prototype.hasParseTreeNodeAttribute = function(name) {
return $tw.utils.hop(this.parseTreeNode.attributes,name);
};
/*
Get the value of an attribute
*/