浏览代码

Fix: narrow beforeRequest hook type to avoid boolean in array (#23860)

Signed-off-by: Yongtao Huang <yongtaoh2022@gmail.com>
Co-authored-by: Yongtao Huang <99629139+hyongtao-db@users.noreply.github.com>
tags/1.8.0
Yongtao Huang 2 个月前
父节点
当前提交
02194db0c6
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      web/service/fetch.ts

+ 1
- 1
web/service/fetch.ts 查看文件

...baseHooks.beforeRequest || [], ...baseHooks.beforeRequest || [],
isPublicAPI && beforeRequestPublicAuthorization, isPublicAPI && beforeRequestPublicAuthorization,
!isPublicAPI && !isMarketplaceAPI && beforeRequestAuthorization, !isPublicAPI && !isMarketplaceAPI && beforeRequestAuthorization,
].filter(Boolean),
].filter((h): h is BeforeRequestHook => Boolean(h)),
afterResponse: [ afterResponse: [
...baseHooks.afterResponse || [], ...baseHooks.afterResponse || [],
afterResponseErrorCode(otherOptions), afterResponseErrorCode(otherOptions),

正在加载...
取消
保存