parser: soft fail when widget type is not supported
This commit is contained in:
parent
2cb1dfb809
commit
a6b1d81964
1 changed files with 5 additions and 0 deletions
|
|
@ -43,6 +43,11 @@ var Parser = class Parser {
|
|||
// Set default widget type
|
||||
props.type = tab ? 'tab' : props.type || 'fader'
|
||||
|
||||
if (!this.widgets[props.type]) {
|
||||
console.error('[' + props.id + '] Widget type "' + props.type +'" does not exist, falling back to "fader"')
|
||||
props.type = 'fader'
|
||||
}
|
||||
|
||||
// Get widget's defaults
|
||||
var defaults = this.defaults[props.type]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue