Skip to content

Commit efad66f

Browse files
committed
fix: #52 url 默认为 undefined
1 parent 3069e12 commit efad66f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/useRequest/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export function useRequest<T = any>(
8888
export function useRequest<T = any>(
8989
...args: any[]
9090
): OverallUseRequestReturn<T> & PromiseLike<OverallUseRequestReturn<T>> {
91-
let url: string = '';
91+
let url: string | undefined;
9292

9393
const tmpArgs = [...args]; // copy
9494
if (tmpArgs.length > 0 && isString(tmpArgs[0])) {

0 commit comments

Comments
 (0)