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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user