luci2: use custom object merge in LuCI2.ui.menu.firstChildView() to avoid overwriting...
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 9 Oct 2013 20:01:27 +0000 (20:01 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 9 Oct 2013 20:01:27 +0000 (20:01 +0000)
luci2/htdocs/luci2/luci2.js

index 94bd4b07bf502d39b632772fc9987eb901779099..2bf73c82772295b0491a78344aff1c6e545f9cb7 100644 (file)
@@ -2333,7 +2333,10 @@ function LuCI2()
                                var child = this.firstChildView(nodes[i]);
                                if (child)
                                {
-                                       $.extend(node, child);
+                                       for (var key in child)
+                                               if (!node.hasOwnProperty(key) && child.hasOwnProperty(key))
+                                                       node[key] = child[key];
+
                                        return node;
                                }
                        }