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 f94fb7728f
commit 0b804ba71c

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]