summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorAnton Kikin <a.kikin@tano-systems.com>2020-05-24 02:12:20 +0300
committerAnton Kikin <a.kikin@tano-systems.com>2020-05-24 02:12:20 +0300
commitc00d0d9473803eec3248f0f6d7f3404923c80514 (patch)
tree721403103a3830159ddcc95b587dccd10d84e0ff /modules
parent62ed4e6e402e06d0ce44f8d0b9a260720fa68aa1 (diff)
luci-base: ui.js: fix function declaration in nested statement
Fix "SyntaxError: Strict mode does not allow function declarations in a lexically nested statement" error that may occur in some old browsers (detected on QtWebKit 5.212). Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/ui.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js
index 1f9a436f13..a6598355d6 100644
--- a/modules/luci-base/htdocs/luci-static/resources/ui.js
+++ b/modules/luci-base/htdocs/luci-static/resources/ui.js
@@ -1176,7 +1176,7 @@ var UIDropdown = UIElement.extend(/** @lends LuCI.ui.Dropdown.prototype */ {
ul.style.maxHeight = (vpHeight * 0.5) + 'px';
ul.style.WebkitOverflowScrolling = 'touch';
- function getScrollParent(element) {
+ var getScrollParent = function(element) {
var parent = element,
style = getComputedStyle(element),
excludeStaticParent = (style.position === 'absolute');