Skip to content

Commit 4d3706b

Browse files
committed
fixes none geometry on issues list error #126
Signed-off-by: Daniel Kastl <[email protected]>
1 parent 5d5548a commit 4d3706b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/components/gtt-client/init/events.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,20 @@ function handleIssueSelection(this: any): void {
6767
const currentTarget = evt.currentTarget as HTMLTableRowElement;
6868
const id = currentTarget.id.split('-')[1];
6969
const feature = this.vector.getSource().getFeatureById(id);
70+
71+
// Skip the click handler when there is no vector feature
72+
if (!feature) {
73+
return;
74+
}
75+
7076
this.map.getView().fit(feature.getGeometry().getExtent(), {
7177
size: this.map.getSize(),
7278
});
7379
});
7480
});
7581
}
7682

83+
7784
/**
7885
* Handles the click event on the edit icon to update the map size when the editable form is made visible.
7986
*/

0 commit comments

Comments
 (0)