From f9934ccf27818a472a1b4c80e2e0abf0730d39ef Mon Sep 17 00:00:00 2001 From: Willem Dantuma Date: Tue, 29 Sep 2020 14:56:23 +0200 Subject: [PATCH] Fix AW-1355 --- projects/common-map/src/fm-map/effects/map.effects.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/common-map/src/fm-map/effects/map.effects.ts b/projects/common-map/src/fm-map/effects/map.effects.ts index 4e17cf7..d26b101 100644 --- a/projects/common-map/src/fm-map/effects/map.effects.ts +++ b/projects/common-map/src/fm-map/effects/map.effects.ts @@ -150,8 +150,10 @@ export class MapEffects { for (let f of action.features) { extend(extent, (f as Feature).getGeometry().getExtent()); } + if(action.features && action.features.length >0) { + actions.push(new mapActions.SetExtent(extent)); + } } - actions.push(new mapActions.SetExtent(extent)); } return actions; }));