Skip to content

Commit

Permalink
Small fix for relative URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-ignatov committed Feb 13, 2025
1 parent d03573a commit 9d3729b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
var strRe = String(re);
strRe = strRe.substring(1, strRe.length - 1); // Remove the regex slashes
return model.findMatches(strRe, false, true, true, false, true).map(function(res) {
var url = new URL(res.matches[1], fhirUrlObject?.origin)
var url = new URL(res.matches[1], fhirUrlObject)
if (lang == "json") {
url.searchParams.set("_format", "json")
}
Expand Down Expand Up @@ -102,7 +102,7 @@
return null;
}

var url = new URL(match[1], fhirUrlObject?.origin)
var url = new URL(match[1], fhirUrlObject)
if (lang == "json") {
url.searchParams.set("_format", "json")
}
Expand Down

0 comments on commit 9d3729b

Please sign in to comment.