Skip to content

Commit

Permalink
Make URL absolute even if it has no protocol.
Browse files Browse the repository at this point in the history
  • Loading branch information
kring committed Dec 12, 2019
1 parent 6e59500 commit bab2d36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ReactViews/Workbench/Controls/Legend.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ function makeAbsolute(url) {
}

const uri = new URI(url);
if (uri.protocol() !== "http" && uri.protocol() !== "https") {
if (uri.protocol() && uri.protocol() !== "http" && uri.protocol() !== "https") {
return url;
} else {
return uri.absoluteTo(window.location.href).toString();
Expand Down

0 comments on commit bab2d36

Please sign in to comment.