Merge branch 'fix'

This commit is contained in:
guozhigq
2024-11-16 22:51:16 +08:00
3 changed files with 4 additions and 3 deletions

View File

@ -212,7 +212,8 @@ class Request {
if (extra != null) {
if (extra['ua'] != null) {
options ??= Options();
options.headers!['user-agent'] = headerUa(type: extra['ua']);
options.headers ??= <String, dynamic>{};
options.headers?['user-agent'] = headerUa(type: extra['ua']);
}
}
try {