Skip to content

Commit

Permalink
Merge pull request #620 from Neovici/feat/mini-null-undefined
Browse files Browse the repository at this point in the history
fix(mini): check for null and undefined mini attribute
  • Loading branch information
megheaiulian authored Jun 19, 2024
2 parents f1823da + 18c0da7 commit 9fd8063
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/use-mini.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ export const useMini = ({ host, canvasWidth, columns: _columns }) => {
() =>
isMiniSize
? _columns
?.filter((c) => c.mini !== null)
?.filter((c) => c.mini != null)
.sort((a, b) => (a.mini ?? 0) - (b.mini ?? 0))
: [],
[_columns, isMiniSize],
);

const [miniColumn, ...miniColumns] = columns ?? [];

useEffect(() => {
Expand Down

0 comments on commit 9fd8063

Please sign in to comment.