mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-12-13 04:08:06 +00:00
Raise error for unknown macro invocations
This commit is contained in:
@@ -48,6 +48,9 @@ var Macro = function(macroName,srcParams,content,wiki,dependencies) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// If Macro() has been called without 'new' then instantiate the right macro class
|
// 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);
|
return new MacroClass(macroName,srcParams,content,wiki,dependencies);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user