r8455 introduced good changes to Class.js that gave us useful instanceof results. This change also made is so that people using the Class function to extend from non-OL constructors were unwittingly modifying their prototypes (by giving them an initialize property whose value was undefined). By ensuring that the parent prototype has an initialize property already, we don't add anything unexpected. r=crschmidt (closes #1987)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9051 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -558,6 +558,12 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
this.regExes.trimSpace, "");
|
||||
attributes[name] = value;
|
||||
}
|
||||
} else {
|
||||
// If child has no childNodes (grandchildren),
|
||||
// set an attribute with null value.
|
||||
// e.g. <prefix:fieldname/> becomes
|
||||
// {fieldname: null}
|
||||
attributes[child.nodeName.split(":").pop()] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user