From dcf972f1fb013fe63425e6de48ff3aa7ab7c044c Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 9 Oct 2013 20:01:27 +0000 Subject: [PATCH] luci2: use custom object merge in LuCI2.ui.menu.firstChildView() to avoid overwriting the original title --- luci2/htdocs/luci2/luci2.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/luci2/htdocs/luci2/luci2.js b/luci2/htdocs/luci2/luci2.js index 94bd4b0..2bf73c8 100644 --- a/luci2/htdocs/luci2/luci2.js +++ b/luci2/htdocs/luci2/luci2.js @@ -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; } } -- 2.11.0