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:
parent
1c9ef2af45
commit
ab4bdc0337
@ -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);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user