Skip to content

Commit

Permalink
fix: ensure folder always displays its children
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-Torrent committed Oct 12, 2021
1 parent 406659c commit b7be17b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/common/SideContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
ITEM_PINNED_ID
} from '../../config/selectors';
import { getDirectParentId } from '../../utils/item';
import { ITEM_TYPES } from '../../enums';

const useStyles = makeStyles((theme) => ({
iconButton: {
Expand Down Expand Up @@ -59,7 +60,7 @@ const useStyles = makeStyles((theme) => ({

export default function SideContent({ children, item }) {

const parentId = getDirectParentId(item.get('path')) || item.get('path');
const parentId = (item.get('type') !== ITEM_TYPES.FOLDER && getDirectParentId(item.get('path'))) || item.get('id');

const {
isPinnedMenuOpen,
Expand Down

0 comments on commit b7be17b

Please sign in to comment.