Skip to content

Commit

Permalink
fix: imagery layer context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
alebinson committed Jan 17, 2024
1 parent f60221d commit e312e70
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/common/hooks/mapMenus/useHandleMapMenuTemplates.hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ export const useHandleMapMenuTemplates = (
default:
const tempGroup = {...groupTemplateMenuItem};
// Check if group holds WFS actions by presence at least one such item
const wfsFeature = groupTemplateMenuItem.items.find((item) => (item as MenuItem).action.action === ContextActions.QUERY_WFS_FEATURE)
const wfsFeature = groupTemplateMenuItem.items.find((item) => {
const menuItem = item as MenuItem;
return menuItem.action ? menuItem.action.action === ContextActions.QUERY_WFS_FEATURE : false;
});
if (wfsFeature) {
tempGroup.groupProps.titleTranslationId = intl.formatMessage({
id: tempGroup.groupProps.titleTranslationId,
Expand Down

0 comments on commit e312e70

Please sign in to comment.