[Mapbender-commits] r4793 - branches/2.6/lib

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Oct 20 06:04:57 EDT 2009


Author: christoph
Date: 2009-10-20 06:04:56 -0400 (Tue, 20 Oct 2009)
New Revision: 4793

Modified:
   branches/2.6/lib/basic.js
Log:
bug fix in cloneObject

Modified: branches/2.6/lib/basic.js
===================================================================
--- branches/2.6/lib/basic.js	2009-10-19 15:25:34 UTC (rev 4792)
+++ branches/2.6/lib/basic.js	2009-10-20 10:04:56 UTC (rev 4793)
@@ -64,7 +64,7 @@
 function cloneObject (p, c) {
 	var c = c || {};
 	for (var i in p) {
-		if (typeof p[i] === 'object') {
+		if (typeof p[i] === 'object' && p[i] !== null) {
 			c[i] = (p[i].constructor === Array) ? [] : {};
 			cloneObject(p[i], c[i]);
 		}



More information about the Mapbender_commits mailing list