diff --git a/lib/OpenLayers/Feature.js b/lib/OpenLayers/Feature.js index 557e213082..516f7abc0c 100644 --- a/lib/OpenLayers/Feature.js +++ b/lib/OpenLayers/Feature.js @@ -39,7 +39,7 @@ OpenLayers.Feature.prototype= { initialize: function(layer, lonlat, data, id) { this.layer = layer; this.lonlat = lonlat; - this.data = data; + this.data = (data != null) ? data : new Object(); this.id = (id ? id : 'f'+Math.random()); },