Skip to content

Commit

Permalink
fix: handle undefined childrenOrder (#483)
Browse files Browse the repository at this point in the history
* fix: handle undefined childrenOrder

* refactor: add null folder
  • Loading branch information
pyphilia authored Jan 22, 2024
1 parent 005221d commit b2470fc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 236 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@emotion/styled": "11.11.0",
"@graasp/chatbox": "3.0.3",
"@graasp/query-client": "2.2.3",
"@graasp/sdk": "github:graasp/graasp-sdk#377-sort-children",
"@graasp/sdk": "3.5.0",
"@graasp/translations": "1.21.1",
"@graasp/ui": "4.3.0",
"@mui/icons-material": "5.14.19",
Expand Down Expand Up @@ -95,5 +95,8 @@
"vite-plugin-checker": "^0.6.2",
"vite-plugin-istanbul": "5.0.0"
},
"resolutions": {
"@graasp/sdk": "3.5.0"
},
"packageManager": "yarn@4.0.2"
}
2 changes: 1 addition & 1 deletion src/utils/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const buildItemsTree = (
// sort by children order or default to all if not defined
const children = sortChildrenWith(
mapTree[node.id] ?? [],
node.extra.folder?.childrenOrder,
node.extra.folder?.childrenOrder ?? [],
);

const entry: PartialItemWithChildren = {
Expand Down
Loading

0 comments on commit b2470fc

Please sign in to comment.