diff --git a/src/common/hook/useStreaming/index.ts b/src/common/hook/useStreaming/index.ts index 71bc41d7..c2f538ae 100644 --- a/src/common/hook/useStreaming/index.ts +++ b/src/common/hook/useStreaming/index.ts @@ -62,7 +62,7 @@ export default function useStreaming() { } = store.getState(); let api_token = token; const tokenAlmostExpire = dayjs().isAfter(new Date(expireTime - 20 * 1000)); - if (tokenAlmostExpire) { + if (tokenAlmostExpire && refreshToken && token) { const resp = await renewToken({ token, refresh_token: refreshToken