Skip to content

Commit

Permalink
#3172: Only layout when we have dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
gjvoosten committed Sep 16, 2020
1 parent 0fcc3e8 commit 2610226
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/src/layouts/useLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ const useLayout = (layoutType, viewDate) => {
break
}
return item => {
return layoutTemp(item, dimensions, viewDate)
return !dimensions?.width || !dimensions?.height
? null
: layoutTemp(item, dimensions, viewDate)
}
}, [layoutType, dimensions, viewDate])

Expand Down

0 comments on commit 2610226

Please sign in to comment.