🥅 Adds an option to surpress widget errors
This commit is contained in:
@@ -541,11 +541,12 @@ export default {
|
||||
widgetOptions() {
|
||||
const options = this.widget.options || {};
|
||||
const timeout = this.widget.timeout || null;
|
||||
const ignoreErrors = this.widget.ignoreErrors || false;
|
||||
const useProxy = this.appConfig.widgetsAlwaysUseProxy || !!this.widget.useProxy;
|
||||
const updateInterval = this.widget.updateInterval !== undefined
|
||||
? this.widget.updateInterval : null;
|
||||
return {
|
||||
timeout, useProxy, updateInterval, ...options,
|
||||
timeout, ignoreErrors, useProxy, updateInterval, ...options,
|
||||
};
|
||||
},
|
||||
/* A unique string to reference the widget by */
|
||||
|
||||
@@ -74,7 +74,9 @@ const WidgetMixin = {
|
||||
/* Called when an error occurs. Logs to handler, and passes to parent component */
|
||||
error(msg, stackTrace) {
|
||||
ErrorHandler(msg, stackTrace);
|
||||
this.$emit('error', msg);
|
||||
if (!this.options.ignoreErrors) {
|
||||
this.$emit('error', msg);
|
||||
}
|
||||
},
|
||||
/* When a data request update starts, show loader */
|
||||
startLoading() {
|
||||
|
||||
Reference in New Issue
Block a user