From 0b804ba71c98bbfad370863b2233fda0e12cefb7 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Sun, 7 Apr 2019 09:59:56 +0200 Subject: [PATCH] parser: soft fail when widget type is not supported --- src/client/app/parser.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/client/app/parser.js b/src/client/app/parser.js index fb26c14d..c02d1e11 100644 --- a/src/client/app/parser.js +++ b/src/client/app/parser.js @@ -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]