Skip to content

Commit

Permalink
Merge pull request #25 from sayyyho/dev
Browse files Browse the repository at this point in the history
Fix: localStorage 에러 수정
  • Loading branch information
sayyyho authored Sep 6, 2024
2 parents dee74b6 + 5ea8609 commit 32e3389
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/api/getID.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { instance } from "./instance";
export const getUserID = async () => {
try {
const res = await instance.post(`/api/login`, {});
localStorage.setItem("username", res.data.username);
if (res.data && res.data.username) {
localStorage.setItem("username", res.data.username);
}
// 또 링크 받았을 때, 아예 온보딩으로 이동시킨 뒤에 발급받고 채팅 참가하도록
} catch (err) {
console.log(err);
}
};

export const Testing = "";

0 comments on commit 32e3389

Please sign in to comment.