From 44cf00eb044ebfc4852b15534b8ea2ad69610d02 Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Sat, 12 Feb 2022 11:12:26 -0800 Subject: [PATCH] fix(zone): main thread promise handling issue --- packages/angular/tsconfig.lib.prod.json | 2 +- packages/zone-js/dist/core.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/angular/tsconfig.lib.prod.json b/packages/angular/tsconfig.lib.prod.json index 8c73a35..2a2faa8 100644 --- a/packages/angular/tsconfig.lib.prod.json +++ b/packages/angular/tsconfig.lib.prod.json @@ -4,6 +4,6 @@ "declarationMap": false }, "angularCompilerOptions": { - "compilationMode": "full" + "compilationMode": "partial" } } diff --git a/packages/zone-js/dist/core.ts b/packages/zone-js/dist/core.ts index a77841e..8b0d1c0 100644 --- a/packages/zone-js/dist/core.ts +++ b/packages/zone-js/dist/core.ts @@ -53,3 +53,7 @@ Zone.__load_patch('nativescript_event_target_api', (g, z, api: any) => { Zone.__load_patch('nativescript_patch_class_api', (g, z, api) => { api.patchClass = (className: string) => patchClass(className, api); }); + +// Initialize zone microtask queue on main thread +// TODO: dive into the ios runtime (PromiseProxy) and find a better solution +Promise.resolve().then(() => {});