Skip to content
Snippets Groups Projects
Commit 657c2fd3 authored by Miłosz Grocholewski's avatar Miłosz Grocholewski
Browse files

fix(semantic-view): prevent maximum call stack error in semantic view

parent 85f517b3
No related branches found
No related tags found
1 merge request!362fix(semantic-view): prevent maximum call stack error in semantic view
Pipeline #100028 passed
......@@ -7,10 +7,11 @@ export default function isFeatureInCompartment(
feature: Feature,
): boolean {
const compartmentId: undefined | null | number = feature.get('compartmentId');
if (!compartmentId) {
return false;
}
if (compartmentId === parentCompartmentId) {
if (compartmentId === parentCompartmentId || compartmentId === feature.get('id')) {
return true;
}
const compartmentFeature = vectorSource.getFeatureById(compartmentId);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment