Skip to content

Commit

Permalink
fix: for test pass
Browse files Browse the repository at this point in the history
Signed-off-by: CaiJingLong <[email protected]>
  • Loading branch information
CaiJingLong committed Mar 14, 2024
1 parent 5b5e5eb commit c6d8c49
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dio/lib/src/dio_mixin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,11 @@ abstract class DioMixin implements Dio {
requestOptions.cancelToken,
Future(() async {
final requestHandler = RequestInterceptorHandler();
await interceptor(state.data as RequestOptions, requestHandler);
final res =
interceptor(state.data as RequestOptions, requestHandler);
if (res is Future) {
await res;
}
return requestHandler.future;
}),
);
Expand Down

0 comments on commit c6d8c49

Please sign in to comment.