🚨 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

@@ -36,6 +36,8 @@ export const LoadConfigComponent = () => {
let newConfig: ConfigType = JSON.parse(fileText); let newConfig: ConfigType = JSON.parse(fileText);
if (!newConfig.schemaVersion) { if (!newConfig.schemaVersion) {
// client side logging
// eslint-disable-next-line no-console
console.warn( console.warn(
'a legacy configuration schema was deteced and migrated to the current schema' 'a legacy configuration schema was deteced and migrated to the current schema'
); );

View File

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