GPX read should allow for blank attribute nodes

This commit is contained in:
Peter Robins
2012-02-16 13:32:10 +00:00
parent 6b8ba43e20
commit 584d33eaa3

View File

@@ -197,7 +197,7 @@ OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, {
var attributes = {};
var attrNode = node.firstChild, value, name;
while(attrNode) {
if(attrNode.nodeType == 1) {
if(attrNode.nodeType == 1 && attrNode.firstChild) {
value = attrNode.firstChild;
if(value.nodeType == 3 || value.nodeType == 4) {
name = (attrNode.prefix) ?