From aa4d8776881dda2a3269f86f7d7f765c6d511748 Mon Sep 17 00:00:00 2001 From: euzuro Date: Thu, 1 Jun 2006 11:14:29 +0000 Subject: [PATCH] add definition/instantiation protection for if anyone ever wants to subclass off of WMS.js git-svn-id: http://svn.openlayers.org/trunk/openlayers@492 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/WMS.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Layer/WMS.js b/lib/OpenLayers/Layer/WMS.js index 0c82317ef4..ff4e4e31e5 100644 --- a/lib/OpenLayers/Layer/WMS.js +++ b/lib/OpenLayers/Layer/WMS.js @@ -23,8 +23,15 @@ OpenLayers.Layer.WMS.prototype = * @param {hash} params */ initialize: function(name, url, params) { - OpenLayers.Layer.Grid.prototype.initialize.apply(this, arguments); - OpenLayers.Util.applyDefaults(this.params, this.DEFAULT_PARAMS); + var newArguments = new Array(); + if (arguments.length > 0) { + newArguments.push(name, url, params); + } + OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments); + + if (arguments.length > 0) { + OpenLayers.Util.applyDefaults(this.params, this.DEFAULT_PARAMS); + } }, /**