From abbdd9cf2bda5aab5559be53706961edf33f782b Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Fri, 6 May 2022 18:25:39 -0500 Subject: [PATCH] Add support for relative urls --- helpers/url.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/url.js b/helpers/url.js index 43a3c5b..1c6ee01 100644 --- a/helpers/url.js +++ b/helpers/url.js @@ -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