🚨 Fix build warnings

This commit is contained in:
Manuel Ruwe
2023-01-07 17:03:13 +01:00
parent 1ea4ca2149
commit 7c0cf6f4ec
2 changed files with 4 additions and 1 deletions

View File

@@ -38,8 +38,9 @@ export const useGridstack = (
// width of the wrapper (updating on page resize)
const root: HTMLHtmlElement = useMemo(() => document.querySelector(':root')!, []);
if (!mainAreaWidth || !shapeSize || !wrapperColumnCount)
if (!mainAreaWidth || !shapeSize || !wrapperColumnCount) {
throw new Error('UseGridstack should not be executed before mainAreaWidth has been set!');
}
const items = useMemo(
() =>