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

@@ -169,7 +169,7 @@
function test_Util_applyDefaults(t) {
t.plan(11);
t.plan(12);
var to = {
'a': "abra",
@@ -204,6 +204,15 @@
var ret = OpenLayers.Util.applyDefaults(to, from);
t.eq(ret.rand, from.rand, "works with undefined to");
//regression test for #1716 -- allow undefined from
try {
OpenLayers.Util.applyDefaults({}, undefined);
t.ok(true, "no exception thrown when from is undefined");
} catch(err) {
t.fail("exception thrown when from is undefined:" + err);
}
}
function test_Util_getParameterString(t) {