mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-18 07:40:42 +00:00
Add a better error message for unknown widgets
This commit is contained in:
@@ -32,10 +32,10 @@ var WidgetRenderer = function(renderTree,renderContext,parseTreeNode) {
|
||||
if(WidgetClass) {
|
||||
this.widget = new WidgetClass(this);
|
||||
} else {
|
||||
// Error if we couldn't find the widget
|
||||
this.children = this.renderTree.createRenderers(this.renderContext,[
|
||||
{type: "text", text: "Unknown widget type '" + this.parseTreeNode.tag + "'"}
|
||||
]);
|
||||
WidgetClass = this.widgetClasses.error;
|
||||
if(WidgetClass) {
|
||||
this.widget = new WidgetClass(this,"Unknown widget '" + this.parseTreeNode.tag + "'");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user