Ver código fonte

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 meses atrás
pai
commit
02194db0c6
Nenhuma conta vinculada ao e-mail do autor do commit
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1
    1
      web/service/fetch.ts

+ 1
- 1
web/service/fetch.ts Ver arquivo

@@ -162,7 +162,7 @@ async function base<T>(url: string, options: FetchOptionType = {}, otherOptions:
...baseHooks.beforeRequest || [],
isPublicAPI && beforeRequestPublicAuthorization,
!isPublicAPI && !isMarketplaceAPI && beforeRequestAuthorization,
].filter(Boolean),
].filter((h): h is BeforeRequestHook => Boolean(h)),
afterResponse: [
...baseHooks.afterResponse || [],
afterResponseErrorCode(otherOptions),

Carregando…
Cancelar
Salvar