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 94bd4b0..2bf73c8 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;
                                }
                        }