Skip to content

Commit

Permalink
Fix a 'Cannot read properties of undefined' error
Browse files Browse the repository at this point in the history
  • Loading branch information
leofeyer committed Nov 25, 2024
1 parent dd2d2b5 commit 784576e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function getExtension(url) {
}

export function isPrefixedBy(baseURL, url) {
const prefix = getPrefix(url)
const prefix = getPrefix(url) || '/'
return baseURL.href === expandURL(prefix).href || baseURL.href.startsWith(prefix)
}

Expand Down

0 comments on commit 784576e

Please sign in to comment.