mirror of
https://github.com/usebruno/bruno.git
synced 2025-06-25 22:41:30 +02:00
fix: Failed to construct 'URL': Invalid URL everytime the URL is modified (#2897)
* fix: Failed to construct 'URL': Invalid URL everytime the URL is modified A non-parsable URL should be an acceptable state while the text is being typed. * chore: path params are returned as empty --------- Co-authored-by: Anoop M D <anoop.md1421@gmail.com>
This commit is contained in:
parent
4ddccefee3
commit
ad388e5a6a
@ -44,7 +44,8 @@ export const parsePathParams = (url) => {
|
|||||||
try {
|
try {
|
||||||
uri = new URL(uri);
|
uri = new URL(uri);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw e;
|
// URL is non-parsable, is it incomplete? Ignore.
|
||||||
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
let paths = uri.pathname.split('/');
|
let paths = uri.pathname.split('/');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user