mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
fix: 修复部分环境无 clearTimeout 的问题
This commit is contained in:
4
backend/src/vendor/open-api.js
vendored
4
backend/src/vendor/open-api.js
vendored
@@ -316,7 +316,9 @@ export function HTTP(defaultOptions = { baseURL: '' }) {
|
||||
return (
|
||||
timer
|
||||
? Promise.race([timer, worker]).then((res) => {
|
||||
clearTimeout(timeoutid);
|
||||
if (typeof clearTimeout !== 'undefined') {
|
||||
clearTimeout(timeoutid);
|
||||
}
|
||||
return res;
|
||||
})
|
||||
: worker
|
||||
|
||||
Reference in New Issue
Block a user