Opera returns a 'null' instead of an empty string if the attribute doesn't

exist. Fallback to an empty string if getAttributeNS returns null. With
this change, the Format.XML test passes in Opera. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5453 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-12-17 04:38:12 +00:00
parent 428710e3af
commit abfe313ab4

View File

@@ -247,7 +247,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, {
getAttributeNS: function(node, uri, name) {
var attributeValue = "";
if(node.getAttributeNS) {
attributeValue = node.getAttributeNS(uri, name);
attributeValue = node.getAttributeNS(uri, name) || "";
} else {
var attributeNode = this.getAttributeNodeNS(node, uri, name);
if(attributeNode) {