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