Skip to content
This repository has been archived by the owner on Dec 28, 2024. It is now read-only.

Handle a baseURI of null #91

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions iron-image.html
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,11 @@
},

_resolveSrc: function(testSrc) {
var baseURI = /** @type {string} */(this.ownerDocument.baseURI);
return (new URL(Polymer.ResolveUrl.resolveUrl(testSrc, baseURI), baseURI)).href;
var baseURI = this.ownerDocument.baseURI;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@type isn't needed anymore?

if (baseURI) {
return new URL(testSrc, baseURI).href;
}
return testSrc;
}
});
</script>
Expand Down