diff --git a/components/lib/splitter/Splitter.js b/components/lib/splitter/Splitter.js index 358e4c2474..cc2bfb7a08 100644 --- a/components/lib/splitter/Splitter.js +++ b/components/lib/splitter/Splitter.js @@ -118,7 +118,9 @@ export const Splitter = React.memo( }, [props.stateStorage]); const saveState = (sizes) => { - getStorage().setItem(props.stateKey, JSON.stringify(sizes)); + if (ObjectUtils.isArray(sizes)) { + getStorage().setItem(props.stateKey, JSON.stringify(sizes)); + } }; const restoreState = React.useCallback(() => {