Skip to content

Commit 202f929

Browse files
author
Zefeng (Daniel) Wang
committed
Fix build issue with undefined.
1 parent e9f588d commit 202f929

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pages/packet/components/useIsMobile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const checkIsMobile = (windowWidth) => {
77
const useIsMobile = () => {
88
const isWindowClient = typeof window === 'object';
99

10-
const [isMobile, setIsMobile] = useState(isWindowClient ? checkIsMobile(window.innerWidth) : undefined);
10+
const [isMobile, setIsMobile] = useState(isWindowClient ? checkIsMobile(window.innerWidth) : false);
1111

1212
useEffect(() => {
1313
const setSize = () => {

0 commit comments

Comments
 (0)