1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-02-02 12:19:11 +00:00

Fix an annoying little bug that prevents importvariables being used inside action-createtiddler in action strings

The root cause was that action-createtiddler widget was calling refreshChildren() with no argument.

A secondary factor was that importvariables widget was not defensive in handling a missing changedTiddlers parameter
This commit is contained in:
Jeremy Ruston 2024-07-21 16:50:55 +01:00
parent 3bdd449b3e
commit fb641d340c
2 changed files with 2 additions and 1 deletions

View File

@ -104,7 +104,7 @@ CreateTiddlerWidget.prototype.invokeAction = function(triggeringWidget,event) {
} }
this.setVariable("createTiddler-title",title); this.setVariable("createTiddler-title",title);
this.setVariable("createTiddler-draftTitle",draftTitle); this.setVariable("createTiddler-draftTitle",draftTitle);
this.refreshChildren(); this.refreshChildren([]);
return true; // Action was invoked return true; // Action was invoked
}; };

View File

@ -107,6 +107,7 @@ ImportVariablesWidget.prototype.execute = function(tiddlerList) {
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
*/ */
ImportVariablesWidget.prototype.refresh = function(changedTiddlers) { ImportVariablesWidget.prototype.refresh = function(changedTiddlers) {
changedTiddlers = changedTiddlers || {};
// Recompute our attributes and the filter list // Recompute our attributes and the filter list
var changedAttributes = this.computeAttributes(), var changedAttributes = this.computeAttributes(),
tiddlerList = this.wiki.filterTiddlers(this.getAttribute("filter"),this); tiddlerList = this.wiki.filterTiddlers(this.getAttribute("filter"),this);