diff --git a/src/components/Config/LoadConfig.tsx b/src/components/Config/LoadConfig.tsx index 0f40c62ff..d2cd232ff 100644 --- a/src/components/Config/LoadConfig.tsx +++ b/src/components/Config/LoadConfig.tsx @@ -36,6 +36,8 @@ export const LoadConfigComponent = () => { let newConfig: ConfigType = JSON.parse(fileText); if (!newConfig.schemaVersion) { + // client side logging + // eslint-disable-next-line no-console console.warn( 'a legacy configuration schema was deteced and migrated to the current schema' ); diff --git a/src/components/Dashboard/Wrappers/gridstack/use-gridstack.ts b/src/components/Dashboard/Wrappers/gridstack/use-gridstack.ts index 723eb3e84..a47f07486 100644 --- a/src/components/Dashboard/Wrappers/gridstack/use-gridstack.ts +++ b/src/components/Dashboard/Wrappers/gridstack/use-gridstack.ts @@ -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( () =>