Skip to content

Commit

Permalink
fix: Fix reason.message not existing case (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
btea authored Jun 14, 2023
1 parent a22b969 commit 2508030
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/output/srcdoc.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
}

window.addEventListener("unhandledrejection", event => {
if (event.reason.message.includes('Cross-origin')) {
if (event.reason.message && event.reason.message.includes('Cross-origin')) {
event.preventDefault()
return
}
Expand Down

0 comments on commit 2508030

Please sign in to comment.