Skip to content

Commit d60f378

Browse files
committed
fix: review fix
1 parent 1d191a2 commit d60f378

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/Drawer/Drawer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import React from 'react';
33
import {DrawerItem, Drawer as GravityDrawer} from '@gravity-ui/navigation';
44

55
import {cn} from '../../utils/cn';
6+
import {isNumeric} from '../../utils/utils';
67

78
import {useDrawerContext} from './DrawerContext';
89

@@ -40,7 +41,7 @@ const DrawerPaneContentWrapper = ({
4041
}: DrawerPaneContentWrapperProps) => {
4142
const [drawerWidth, setDrawerWidth] = React.useState(() => {
4243
const savedWidth = localStorage.getItem(storageKey);
43-
return savedWidth ? Number(savedWidth) : defaultWidth;
44+
return isNumeric(savedWidth) ? Number(savedWidth) : defaultWidth;
4445
});
4546

4647
const drawerRef = React.useRef<HTMLDivElement>(null);

0 commit comments

Comments
 (0)