mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 10:20:09 +02:00
refactor: unify error handling behavior (#6755)
* refactor: unify error handling behavior * revert * normalize paths * test... * change * does this work... * fix... * maybe fix * maybe fix * fix * fix...
This commit is contained in:
parent
dcbf9f644e
commit
f903422617
58 changed files with 1123 additions and 299 deletions
|
@ -178,7 +178,7 @@ export function isValidPathname(str: string): boolean {
|
|||
// weird, but is there a better way?
|
||||
const parsedPathname = new URL(str, 'https://domain.com').pathname;
|
||||
return parsedPathname === str || parsedPathname === encodeURI(str);
|
||||
} catch (e) {
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue