Use ol.xml.isDocument in ol.format.KML

This commit is contained in:
Tom Payne
2014-02-04 15:41:23 +01:00
parent 99aa9f207d
commit cd7df92891

View File

@@ -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)) {