Rocket.Chat.ReactNative/app/lib/methods/helpers/protectedFunction.js

8 lines
101 B
JavaScript

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