Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit e6d66d1

Browse files
committed
console error issue fix #473
1 parent 1a596e5 commit e6d66d1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

client/src/pages/Search/Global.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ export default function SearchGlobal({ keyword }) {
215215
}
216216

217217
let isSubscribed = true;
218-
let source = axios.CancelToken.source();
219218

220219
(async () => {
221220
let headers;
@@ -235,7 +234,7 @@ export default function SearchGlobal({ keyword }) {
235234
try {
236235
const response = await apiClient.post(url, body, {
237236
...options,
238-
cancelToken: source.token,
237+
cancelToken: cancelTokenSource.token,
239238
});
240239

241240
headers = response.headers;
@@ -267,7 +266,6 @@ export default function SearchGlobal({ keyword }) {
267266
}
268267
})();
269268

270-
return () => source.cancel();
271269
// eslint-disable-next-line react-hooks/exhaustive-deps
272270
}, [isLoading, isAuthenticated, keyword, orderBy, searchContext]);
273271

0 commit comments

Comments
 (0)