luci-theme-openwrt-2020: use arrow function
authorEamon Xiong <[email protected]>
Mon, 17 Nov 2025 12:51:47 +0000 (20:51 +0800)
committerEamon Xiong <[email protected]>
Mon, 17 Nov 2025 15:41:07 +0000 (23:41 +0800)
Replaced L.bind with an arrow function for simpler syntax and clearer `this` binding.

Signed-off-by: Eamon Xiong <[email protected]>
themes/luci-theme-openwrt-2020/htdocs/luci-static/resources/menu-openwrt2020.js

index e1e9a40680026a769d7330c63de2498fa1be55ac..6e664762027c44aa14f311bc84b315b61cd4bf8f 100644 (file)
@@ -4,7 +4,7 @@
 
 return baseclass.extend({
        __init__() {
-               ui.menu.load().then(L.bind(this.render, this));
+               ui.menu.load().then((tree) => this.render(tree));
        },
 
        render(tree) {