fix(web): 清理测试运行警告
This commit is contained in:
6 files changed
+18
-7
No files matched your search
@@ -5,7 +5,7 @@ import type { ApiClient } from './client'
|
||||
export const apiClientKey: InjectionKey<ApiClient> = Symbol('api-client')
|
||||
|
||||
export function useApiClient(): ApiClient {
|
||||
const client = inject(apiClientKey)
|
||||
const client = inject(apiClientKey, null)
|
||||
if (!client) throw new Error('API_CLIENT_NOT_PROVIDED')
|
||||
return client
|
||||
}
|
||||
Reference in new issue
Block a user