parser: soft fail when widget type is not supported

This commit is contained in:
jean-emmanuel 2019-04-07 09:59:56 +02:00
parent 2cb1dfb809
commit a6b1d81964

View file

@ -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]