fix error in error handler

This commit is contained in:
muzam1l
2022-07-07 23:25:53 +05:30
parent f4f700bea1
commit 860ff66a8a

View File

@@ -73,7 +73,7 @@ const generateHtmlTemplate = (code: string, data?: Record<string, any>) => {
function windowErrorHandler(event) {
event.preventDefault() // to prevent automatically logging to console
console.error(event.error.toString())
console.error(event.error?.toString())
}
window.addEventListener('error', windowErrorHandler);