1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-25 01:20:30 +00:00

Raise error for unknown macro invocations

This commit is contained in:
Jeremy Ruston 2012-05-05 11:21:01 +01:00
parent 1c9ef2af45
commit ab4bdc0337

View File

@ -48,6 +48,9 @@ var Macro = function(macroName,srcParams,content,wiki,dependencies) {
}
} else {
// If Macro() has been called without 'new' then instantiate the right macro class
if(!MacroClass) {
throw "Unknown macro '" + macroName + "'";
}
return new MacroClass(macroName,srcParams,content,wiki,dependencies);
}
};