Skip to content

Commit b3e7a40

Browse files
authored
IBX-7052: UDW gets closed after switching Bookmarks view into grid view (#1088)
1 parent 90e1f66 commit b3e7a40

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/bundle/ui-dev/src/modules/universal-discovery/universal.discovery.module.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,9 @@ const UniversalDiscoveryModule = (props) => {
383383

384384
useEffect(() => {
385385
if (currentView === 'grid') {
386-
loadedLocationsMap[loadedLocationsMap.length - 1].subitems = [];
386+
if (loadedLocationsMap[loadedLocationsMap.length - 1]) {
387+
loadedLocationsMap[loadedLocationsMap.length - 1].subitems = [];
388+
}
387389

388390
dispatchLoadedLocationsAction({ type: 'SET_LOCATIONS', data: loadedLocationsMap });
389391
} else if (

0 commit comments

Comments
 (0)