From 9e96f5191795dee16121ab34d19a83294cbe97c0 Mon Sep 17 00:00:00 2001 From: Arthur Bleil <78227085+arthurbleilzup@users.noreply.github.com> Date: Tue, 29 Mar 2022 17:58:13 -0300 Subject: [PATCH] fix: Navigation (#328) * fix: Navigation Signed-off-by: Arthur Bleil * fix: horus Signed-off-by: Arthur Bleil --- horusec-config.json | 4 +++- package.json | 2 +- src/codegen/compiled/beagle.module/module.ts | 1 + src/runtime/AbstractBeagleRemoteView.ts | 10 ++++++---- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/horusec-config.json b/horusec-config.json index fafa109..6e7790c 100644 --- a/horusec-config.json +++ b/horusec-config.json @@ -10,6 +10,8 @@ "97a887af31ff815d313fc4eb7a010b33c3dcf505f66d03a37c7fc43d7901c906", "a8879d8e44b52578a5fcd53abe195e9bfa4402190dce6f7c688f79ba2558930b", "3d80a08186f5e59dd17534b6c47b728cd10095533b4226a81231eb7438da207a", - "2f8461d840f8041b398adfd3ae78c66f7615bc6f447077f805db29e4adb8199f" + "2f8461d840f8041b398adfd3ae78c66f7615bc6f447077f805db29e4adb8199f", + "5754333b1092926dfd5fa0ab1bebe57b5d6742c63c23bdc3c68773921750eb1b", + "37ab16eb3e933c75be093d679893d3e53181f289aa0bc3d3dae90cd4826dddbc" ] } diff --git a/package.json b/package.json index 44491bb..7788b22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@zup-it/beagle-angular", - "version": "2.0.0", + "version": "2.0.1", "license": "Apache-2.0", "licenses": [ { diff --git a/src/codegen/compiled/beagle.module/module.ts b/src/codegen/compiled/beagle.module/module.ts index 00c7d7d..ee952f8 100644 --- a/src/codegen/compiled/beagle.module/module.ts +++ b/src/codegen/compiled/beagle.module/module.ts @@ -46,6 +46,7 @@ export function createModuleString({ BeagleProvider, { provide: BeagleAngularNavigatorService, + useFactory: (provider: BeagleProvider) => new BeagleAngularNavigatorService(provider), deps: [BeagleProvider], }, ], diff --git a/src/runtime/AbstractBeagleRemoteView.ts b/src/runtime/AbstractBeagleRemoteView.ts index 785d9c0..5466d01 100755 --- a/src/runtime/AbstractBeagleRemoteView.ts +++ b/src/runtime/AbstractBeagleRemoteView.ts @@ -109,10 +109,12 @@ export abstract class AbstractBeagleRemoteView implements AfterViewInit, OnDestr } updateView = (uiTree: IdentifiableBeagleUIElement) => { - this.ngZone.run(() => { - this.tree = uiTree && Object.keys(uiTree).length > 0 ? uiTree : null - this.changeDetector.detectChanges() - }) + if (!this.changeDetector['destroyed']) { + this.ngZone.run(() => { + this.tree = uiTree && Object.keys(uiTree).length > 0 ? uiTree : null + this.changeDetector.detectChanges() + }) + } } elementIdentity = (index: number, element: IdentifiableBeagleUIElement) => element.id