From cd7df928913501ba5b6028b10cff5ff4e5d760cc Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Tue, 4 Feb 2014 15:41:23 +0100 Subject: [PATCH] Use ol.xml.isDocument in ol.format.KML --- src/ol/format/kmlformat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/format/kmlformat.js b/src/ol/format/kmlformat.js index bfcfb82ace..0525cae392 100644 --- a/src/ol/format/kmlformat.js +++ b/src/ol/format/kmlformat.js @@ -1575,8 +1575,8 @@ ol.format.KML.prototype.readFeaturesFromNode = function(node) { * @todo stability experimental */ ol.format.KML.prototype.readName = function(source) { - if (source instanceof Document) { - return this.readNameFromDocument(source); + if (ol.xml.isDocument(source)) { + return this.readNameFromDocument(/** @type {Document} */ (source)); } else if (source instanceof Node) { return this.readNameFromNode(source); } else if (goog.isString(source)) {