From 584d33eaa33ac914d9fbf8bc9b36e76bd9b00b2c Mon Sep 17 00:00:00 2001 From: Peter Robins Date: Thu, 16 Feb 2012 13:32:10 +0000 Subject: [PATCH] GPX read should allow for blank attribute nodes --- lib/OpenLayers/Format/GPX.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OpenLayers/Format/GPX.js b/lib/OpenLayers/Format/GPX.js index 8da76193d2..2b71d3b27d 100644 --- a/lib/OpenLayers/Format/GPX.js +++ b/lib/OpenLayers/Format/GPX.js @@ -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) ?