mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-10-16 00:07:38 +00:00
Fix importvariables crash (#4593)
* Fixed issue: multi nonMacro imports broke everything * Fixed issue: dead variables in import might linger
This commit is contained in:
@@ -38,6 +38,8 @@ Compute the internal state of the widget
|
||||
*/
|
||||
ImportVariablesWidget.prototype.execute = function(tiddlerList) {
|
||||
var widgetPointer = this;
|
||||
// Got to flush all the accumulated variables
|
||||
this.variables = new this.variablesConstructor();
|
||||
// Get our parameters
|
||||
this.filter = this.getAttribute("filter");
|
||||
// Compute the filter
|
||||
@@ -70,7 +72,14 @@ ImportVariablesWidget.prototype.execute = function(tiddlerList) {
|
||||
widgetPointer.variables[key] = widget.variables[key];
|
||||
});
|
||||
} else {
|
||||
widgetPointer.makeChildWidgets([node]);
|
||||
widgetPointer.children = [widgetPointer.makeChildWidget(node)];
|
||||
// No more regenerating children for
|
||||
// this widget. If it needs to refresh,
|
||||
// it'll do so along with the the whole
|
||||
// importvariable tree.
|
||||
if (widgetPointer != this) {
|
||||
widgetPointer.makeChildWidgets = function(){};
|
||||
}
|
||||
widgetPointer = widgetPointer.children[0];
|
||||
}
|
||||
parseTreeNode = parseTreeNode.children && parseTreeNode.children[0];
|
||||
|
Reference in New Issue
Block a user