layout: add guard

old-stable24
Varun Patil 2022-10-17 16:58:02 -07:00
parent e864a4ef45
commit b38195b701
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,