Skip to content

Instantly share code, notes, and snippets.

@rohozhnikoff
Created September 30, 2017 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rohozhnikoff/990edc341972d2e10f73960e024aaab5 to your computer and use it in GitHub Desktop.
Save rohozhnikoff/990edc341972d2e10f73960e024aaab5 to your computer and use it in GitHub Desktop.
function traverseWrapForDev(fn) {
if (__DEV__) {
return (...args) => {
try {
return fn.apply(null, args)
} catch (err) {
throw new Error(err)
}
}
}
return fn;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment