Skip to content

Commit

Permalink
fix: test 환경이 아닌 경우 initialized도 읽지 않도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
jinhokim98 committed Sep 10, 2024
1 parent 5c140d2 commit da5de77
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/src/components/KakaoInitializer/KakaoInitializer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import {useEffect} from 'react';

const KakaoInitializer = ({children}: React.PropsWithChildren) => {
useEffect(() => {
if (!window.Kakao.isInitialized() && process.env.NODE_ENV !== 'test') {
if (process.env.NODE_ENV !== 'test') return;

if (!window.Kakao.isInitialized()) {
window.Kakao.init(process.env.KAKAO_JAVASCRIPT_KEY);
}
}, []);
Expand Down

0 comments on commit da5de77

Please sign in to comment.