Skip to content

Commit a164b65

Browse files
authored
IBX-9489: [OSS] UncaughtTypeError after entering 'Content structure' (#1440)
1 parent 2e799a7 commit a164b65

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/bundle/ui-dev/src/modules/universal-discovery/components/tree-item-toggle-selection/tree.item.toggle.selection.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ const TreeItemToggleSelection = ({ locationId, isContainer, contentTypeIdentifie
2424
parseTooltip(document.querySelector('.c-list'));
2525
}, []);
2626

27+
if (!isUDW) {
28+
return null;
29+
}
30+
2731
const { isInitLocationsDeselectionBlocked, initSelectedLocationsIds } = useContext(SelectionConfigContext);
2832
const [selectedLocations, dispatchSelectedLocationsAction] = useContext(SelectedLocationsContext);
2933
const [multiple, multipleItemsLimit] = useContext(MultipleConfigContext);
3034
const containersOnly = useContext(ContainersOnlyContext);
3135
const allowedContentTypes = useContext(AllowedContentTypesContext);
3236
const restInfo = useContext(RestInfoContext);
3337

34-
if (!isUDW) {
35-
return null;
36-
}
37-
3838
const isSelected = selectedLocations.some((selectedLocation) => selectedLocation.location.id === locationId);
3939
const isNotSelectable =
4040
(containersOnly && !isContainer) || (allowedContentTypes && !allowedContentTypes.includes(contentTypeIdentifier));

0 commit comments

Comments
 (0)