Skip to content

Commit

Permalink
web: Check error type instead of error message
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhjacobs committed Jul 17, 2024
1 parent d48f826 commit 3a587c4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions web/packages/core/src/ruffle-player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1973,10 +1973,7 @@ export class RufflePlayer extends HTMLElement {
) {
// Firefox: Don't display the panic screen if the user leaves the page while something is still loading
return;
} else if (
error instanceof Error &&
error.message === "Failed to load Ruffle WASM"
) {
} else if (error instanceof LoadRuffleWasmError) {
const openInNewTab = this.loadedConfig?.openInNewTab;
const swfUrl = this.loadedConfig && "url" in this.loadedConfig ? new URL(this.loadedConfig.url, document.baseURI) : undefined;
if (openInNewTab && swfUrl) {
Expand Down

0 comments on commit 3a587c4

Please sign in to comment.