Less intrusive version fallback

This commit is contained in:
ahocevar
2012-10-02 16:07:35 +02:00
parent e326a9ea2f
commit 3d1b0f0bd9
2 changed files with 5 additions and 5 deletions

View File

@@ -127,11 +127,6 @@ OpenLayers.Format.XML.VersionedOGC = OpenLayers.Class(OpenLayers.Format.XML, {
var format = OpenLayers.Format[this.name][
"v" + version.replace(/\./g, "_") + profile
];
if (!format && ~version.indexOf('.')) {
// falling back to less specific parser
return this.getParser(
version.substr(0, version.lastIndexOf('.')));
}
if(!format) {
throw "Can't find a " + this.name + " parser for version " +
version + profile;