Skip to content

Commit 3c16fce

Browse files
committed
fix: 에러 수정
1 parent 3847de5 commit 3c16fce

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

apps/ticket-admin/src/data/admin/getTimeTables/queries.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ export const timeTableOptions = (
2323
queryFn: () => {
2424
const url = getPathUrl(API_URL.ADMIN.TIME_TABLE, { eventId: params.eventId });
2525

26-
return instance.get<TimeTableResponse>(url).then((res) => res.data);
26+
return instance.get<TimeTableResponse>(url).then((res) => {
27+
return res?.data || null;
28+
});
2729
},
2830
};
2931
};

apps/ticket-admin/src/lib/axios/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ let isAlertShown = false;
3232

3333
// 응답 인터셉터
3434
instance.interceptors.response.use(
35-
(response: AxiosResponse) => response.data,
35+
(response: AxiosResponse) => response?.data,
3636
async (error: AxiosError) => {
3737
if (typeof window === "undefined") {
3838
// Server에서는 기본 전파

0 commit comments

Comments
 (0)