Created
September 30, 2017 21:26
-
-
Save rohozhnikoff/990edc341972d2e10f73960e024aaab5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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