From 7c0cf6f4ec0fd43396c09c8d2f2d333e25d0f3d4 Mon Sep 17 00:00:00 2001 From: Manuel Ruwe Date: Sat, 7 Jan 2023 17:03:13 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20Fix=20build=20warnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Config/LoadConfig.tsx | 2 ++ src/components/Dashboard/Wrappers/gridstack/use-gridstack.ts | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) 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( () =>