Created
August 22, 2020 23:06
-
-
Save namklabs/89429c744d3efa2610d37bd385a0ea30 to your computer and use it in GitHub Desktop.
replace console warn/error with alert for devices where console is not easily accessible
This file contains 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
console.oldwarn = console.warn; | |
console.warn = (...args) => { | |
alert([...args].join(' ')); | |
console.oldwarn.call(null,...args); | |
} | |
console.olderror = console.error; | |
console.error = (...args) => { | |
alert([...args].join(' ')); | |
console.olderror.call(null,...args); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment