incorporate @ahocevar's suggestion
This commit is contained in:
@@ -188,11 +188,12 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class(
|
|||||||
data = data.documentElement;
|
data = data.documentElement;
|
||||||
}
|
}
|
||||||
var schema = {};
|
var schema = {};
|
||||||
this.readNode(data, schema);
|
if (data.nodeName.split(":").pop() === 'ExceptionReport') {
|
||||||
if (schema.version === undefined) {
|
|
||||||
// an exception must have occurred, so parse it
|
// an exception must have occurred, so parse it
|
||||||
var parser = new OpenLayers.Format.OGCExceptionReport();
|
var parser = new OpenLayers.Format.OGCExceptionReport();
|
||||||
schema.error = parser.read(data);
|
schema.error = parser.read(data);
|
||||||
|
} else {
|
||||||
|
this.readNode(data, schema);
|
||||||
}
|
}
|
||||||
return schema;
|
return schema;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user