verdnatura-chat/app/lib/methods/helpers/protectedFunction.js

9 lines
108 B
JavaScript

export default fn =>
(...params) => {
try {
fn(...params);
} catch (e) {
console.log(e);
}
};