From 2f3caeb7c359b83162b39635d22de574ca0728d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Barbeau?= Date: Tue, 19 Mar 2019 11:04:58 -0400 Subject: [PATCH] fix(share-map): getUrl must not be executed on component initialization if using the context api --- .../lib/share-map/share-map/share-map-binding.directive.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/context/src/lib/share-map/share-map/share-map-binding.directive.ts b/packages/context/src/lib/share-map/share-map/share-map-binding.directive.ts index 883ce95069..36e0a21946 100644 --- a/packages/context/src/lib/share-map/share-map/share-map-binding.directive.ts +++ b/packages/context/src/lib/share-map/share-map/share-map-binding.directive.ts @@ -49,7 +49,9 @@ export class ShareMapBindingDirective implements OnInit { this.layerListService.onlyInRange = onlyInRangeFromUrl === '1' ? true : false; this.layerListService.onlyInRangeInitialized = true; } - this.component.resetUrl(); + if (!this.component.hasApi) { + this.component.resetUrl(); + } }); } }