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:
@@ -247,7 +247,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, {
|
|||||||
getAttributeNS: function(node, uri, name) {
|
getAttributeNS: function(node, uri, name) {
|
||||||
var attributeValue = "";
|
var attributeValue = "";
|
||||||
if(node.getAttributeNS) {
|
if(node.getAttributeNS) {
|
||||||
attributeValue = node.getAttributeNS(uri, name);
|
attributeValue = node.getAttributeNS(uri, name) || "";
|
||||||
} else {
|
} else {
|
||||||
var attributeNode = this.getAttributeNodeNS(node, uri, name);
|
var attributeNode = this.getAttributeNodeNS(node, uri, name);
|
||||||
if(attributeNode) {
|
if(attributeNode) {
|
||||||
|
|||||||
Reference in New Issue
Block a user