Fixing WA crashing in Firefox private mode

Due to the way we now handle the browser cache, previously ignored errors in the Cache API were now explicitly thrown, preventing the loading of Firefox in private mode.
This commit fixes the issue and improves the stacktrace display of errors at the same time.
This commit is contained in:
David Négrier 2022-01-06 11:46:07 +01:00
parent 88509916a8
commit d713c82568
3 changed files with 13 additions and 3 deletions

View file

@ -78,6 +78,9 @@ export class ErrorScene extends Phaser.Scene {
*/
public static showError(error: unknown, scene: ScenePlugin): void {
console.error(error);
if (error instanceof Error) {
console.error("Stacktrace: ", error.stack);
}
console.trace();
if (typeof error === "string" || error instanceof String) {