1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Fix crash on processing anonymous macro parameters

Fixes #151
This commit is contained in:
Jeremy Ruston 2013-09-10 22:08:09 +01:00
parent 08b21b5076
commit e39663ede3

View File

@ -176,7 +176,7 @@ WikiRenderTree.prototype.substituteParameters = function(macroDefinition,macroCa
}
}
// If not, use the next available anonymous macro call parameter
if(!paramValue && macroCallParseTreeNode.params.length > 0) {
if(!paramValue && nextAnonParameter < macroCallParseTreeNode.params.length) {
while(macroCallParseTreeNode.params[nextAnonParameter].name && nextAnonParameter < macroCallParseTreeNode.params.length-1) {
nextAnonParameter++;
}