From ee1f2ceae33172082b52252694dcc627eb4c9c42 Mon Sep 17 00:00:00 2001 From: Manuel Cabarcos Baulina Date: Thu, 19 Oct 2023 11:27:05 +0200 Subject: [PATCH] chore: add possible fix in the angular example --- examples/angular/src/polyfills.ts | 3 +++ examples/angular/src/zone-flags.ts | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 examples/angular/src/zone-flags.ts diff --git a/examples/angular/src/polyfills.ts b/examples/angular/src/polyfills.ts index 429bb9ef..f0d49a2a 100644 --- a/examples/angular/src/polyfills.ts +++ b/examples/angular/src/polyfills.ts @@ -45,6 +45,9 @@ /*************************************************************************************************** * Zone JS is required by default for Angular itself. */ +// Disabling promise rejection wrapping because it can cause some bugs +//https://github.com/angular/angular/issues/31680 +import './zone-flags' import 'zone.js'; // Included with Angular CLI. diff --git a/examples/angular/src/zone-flags.ts b/examples/angular/src/zone-flags.ts new file mode 100644 index 00000000..762950dc --- /dev/null +++ b/examples/angular/src/zone-flags.ts @@ -0,0 +1,2 @@ +;(window as any).__zone_symbol__DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION = + true