Skip to content

Commit b7afcf5

Browse files
committed
Unnecessary error-checking.
1 parent d8041ba commit b7afcf5

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

browser-extension/tests/har-view.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,10 @@ async function loadHar(filename: string) {
6464

6565
// Add redirect routes for each PAGES URL to handle refreshes
6666
Object.entries(PAGES).forEach(([key, url]) => {
67-
try {
68-
const urlObj = new URL(url)
69-
app.get(urlObj.pathname, (_req, res) => {
70-
res.redirect(`/page/${key}.har/gitcasso`)
71-
})
72-
} catch (error) {
73-
console.warn(`Could not create redirect route for ${key}: ${url}`)
74-
}
67+
const urlObj = new URL(url)
68+
app.get(urlObj.pathname, (_req, res) => {
69+
res.redirect(`/page/${key}.har/gitcasso`)
70+
})
7571
})
7672

7773
// List available HAR files

0 commit comments

Comments
 (0)