diff --git a/src/scene/scrollbars.ts b/src/scene/scrollbars.ts index 91e3a627..24f10e7d 100644 --- a/src/scene/scrollbars.ts +++ b/src/scene/scrollbars.ts @@ -23,6 +23,12 @@ export const getScrollBars = ( zoom: Zoom; }, ): ScrollBars => { + if (elements.length === 0) { + return { + horizontal: null, + vertical: null, + }; + } // This is the bounding box of all the elements const [ elementsMinX,