Merge pull request #2842 from eagleon/master
fix: Compatible with browsers that do not support ES2019
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
if (result !== str) {
|
||||
return result;
|
||||
}
|
||||
} catch {
|
||||
} catch (e) {
|
||||
return str;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
try {
|
||||
const { pathname, search } = new URL(url);
|
||||
url = pathname + search;
|
||||
} catch {
|
||||
} catch (e) {
|
||||
/* empty */
|
||||
}
|
||||
return excludeSearch ? url.split('?')[0] : url;
|
||||
@@ -217,7 +217,7 @@
|
||||
const text = await res.text();
|
||||
|
||||
return (cache = text);
|
||||
} catch {
|
||||
} catch (e) {
|
||||
/* empty */
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user