layout: add guard

old-stable24
Varun Patil 2022-10-17 16:58:02 -07:00
parent 88e89c88e0
commit 7ce3d3225d
1 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,8 @@ export function getLayout(
height: number,
rowHeight?: number,
}[] {
if (input.length === 0) return [];
if (!opts.squareMode) {
return justifiedLayout((input), {
containerPadding: 0,