mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Add support for relative urls
This commit is contained in:
parent
0accd4c73e
commit
abbdd9cf2b
1 changed files with 1 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ export function getSiteUrl () {
|
|||
export function getPartPartsFromUrl ( urlString ) {
|
||||
if ( typeof urlString !== 'string' ) throw new Error('urlString must be a string')
|
||||
|
||||
const url = new URL( urlString )
|
||||
const url = new URL( urlString, 'https://doesitarm.com' )
|
||||
|
||||
const pathParts = url.pathname
|
||||
.replace(/^\/+/, '') // Trim slashes from the beginning
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue