Fix navigator tab null issue

This commit is contained in:
Bill 2021-09-16 23:20:23 -04:00
parent 779e2c6b3e
commit a0ac6405c2

View File

@ -221,7 +221,7 @@ export const NavigatorView: FC<NavigatorViewProps> = props =>
<NitroCardView uniqueKey="navigator" className="nitro-navigator"> <NitroCardView uniqueKey="navigator" className="nitro-navigator">
<NitroCardHeaderView headerText={ LocalizeText(isCreatorOpen ? 'navigator.createroom.title' : 'navigator.title') } onCloseClick={ event => setIsVisible(false) } /> <NitroCardHeaderView headerText={ LocalizeText(isCreatorOpen ? 'navigator.createroom.title' : 'navigator.title') } onCloseClick={ event => setIsVisible(false) } />
<NitroCardTabsView> <NitroCardTabsView>
{ topLevelContexts.map((context, index) => { topLevelContexts && (topLevelContexts.length > 0) && topLevelContexts.map((context, index) =>
{ {
return ( return (
<NitroCardTabsItemView key={ index } isActive={ ((topLevelContext === context) && !isCreatorOpen) } onClick={ event => sendSearch('', context.code) }> <NitroCardTabsItemView key={ index } isActive={ ((topLevelContext === context) && !isCreatorOpen) } onClick={ event => sendSearch('', context.code) }>