fix enhancement module error catching

pull/88/head
dperolio 3 years ago
parent efdf5adf9d
commit aeee8ebd32

@ -1,7 +1,3 @@
/**
*
*/
import { Builtin } from '@vizality/entities';
import * as modules from './modules';

@ -8,12 +8,12 @@ export default class Enhancements extends Builtin {
this.callbacks = [];
Object.keys(modules).forEach(async mod => {
try {
const callback = await modules[mod](this);
const callback = await modules[mod].default(this);
if (typeof callback === 'function') {
this.callbacks.push(callback);
}
} catch (err) {
return this.error(modules[mod].labels.concat(mod), err);
return this.error(this._labels.concat(modules[mod].labels), err);
}
});
}

Loading…
Cancel
Save