Create URL object only when we can

This commit is contained in:
oterral
2017-05-24 14:09:28 +02:00
parent 0e4d2b50b4
commit 7804a2db86

View File

@@ -488,7 +488,7 @@ ol.format.KML.readFlatCoordinates_ = function(node) {
*/
ol.format.KML.readURI_ = function(node) {
var s = ol.xml.getAllTextContent(node, false).trim();
if (node.baseURI) {
if (node.baseURI && node.baseURI !== 'about:blank') {
var url = new URL(s, node.baseURI);
return url.href;
} else {