From 77c4cc2a8ddb9fd979a3aa6148fffaee3119300b Mon Sep 17 00:00:00 2001 From: euzuro Date: Tue, 30 May 2006 17:54:11 +0000 Subject: [PATCH] protect for subclassing git-svn-id: http://svn.openlayers.org/trunk/openlayers@471 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/WFS.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/OpenLayers/Layer/WFS.js b/lib/OpenLayers/Layer/WFS.js index cd26067350..f670e22566 100644 --- a/lib/OpenLayers/Layer/WFS.js +++ b/lib/OpenLayers/Layer/WFS.js @@ -28,12 +28,17 @@ OpenLayers.Layer.WFS.prototype = */ initialize: function(name, url, params, featureClass) { this.featureClass = featureClass; - - var newArguments = new Array(name, url, params); + + var newArguments = new Array(); + if (arguments.length > 0) { + newArguments.push(name, url, params); + } OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments); OpenLayers.Layer.Markers.prototype.initialize.apply(this, newArguments); - - OpenLayers.Util.applyDefaults(this.params, this.DEFAULT_PARAMS); + + if (arguments.length > 0) { + OpenLayers.Util.applyDefaults(this.params, this.DEFAULT_PARAMS); + } }, /**