luci-theme-openwrt: use arrow function
authorEamon Xiong <[email protected]>
Mon, 17 Nov 2025 12:50:51 +0000 (20:50 +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/htdocs/luci-static/resources/menu-openwrt.js

index e3352a599cb4c6d534f37aee35f575fef151a240..01b897a34f7eca696664c4d41f82fd59b5cdac51 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) {