fixing regression committed in r5280. applyDefaults() again allows for an undefined value as the 'from' parameter. thanks tim for report and review. (Closes #1716)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@7943 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2008-09-04 02:19:41 +00:00
parent 4783dd5a45
commit 819dc62d09
2 changed files with 11 additions and 2 deletions

View File

@@ -563,7 +563,7 @@ OpenLayers.Util.applyDefaults = function (to, from) {
* properties with the for(property in object) syntax. Explicitly check if
* the source has its own toString property.
*/
if(!fromIsEvt && from.hasOwnProperty
if(!fromIsEvt && from && from.hasOwnProperty
&& from.hasOwnProperty('toString') && !to.hasOwnProperty('toString')) {
to.toString = from.toString;
}