Skip to content

Commit

Permalink
Merge pull request #602 from KhronosGroup/fix/externalErrors
Browse files Browse the repository at this point in the history
Do not show toast for injected code (URL does not exist)
  • Loading branch information
UX3D-labode authored Feb 12, 2025
2 parents 8e3e13f + 671614f commit 8bb64bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ui/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ canvasUI.mount('#canvasUI');
};

window.onerror = function(msg, url, lineNo, columnNo, error) {
// If error is not from the sample viewer, ignore it
if (url === undefined || url === null || url === "") {
return;
}
app.error([
'Message: ' + msg,
'URL: ' + url,
Expand Down

0 comments on commit 8bb64bb

Please sign in to comment.