Fix macrocall widget to not pass $name as a parameter

print-window-tiddler
Jeremy Ruston 2013-10-31 21:59:37 +00:00
rodzic 1ca473fd2f
commit 45f0f46fdf
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -40,7 +40,9 @@ MacroCallWidget.prototype.execute = function() {
// Merge together the parameters specified in the parse tree with the specified attributes
var params = this.parseTreeNode.params ? this.parseTreeNode.params.slice(0) : [];
$tw.utils.each(this.attributes,function(attribute,name) {
params.push({name: name, value: attribute});
if(name !== "$name") {
params.push({name: name, value: attribute});
}
});
// Get the macro value
var text = this.getVariable(this.parseTreeNode.name || this.getAttribute("$name"),{params: params});