mirror of
https://github.com/openwrt/luci.git
synced 2026-02-04 12:06:01 +08:00
luci-base: fix null error
When working with JSONMap backed data sources in tables, sort triggers a null error because this.state is not available. Prevent the null error if it is unavailable. Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
@@ -871,7 +871,8 @@ return baseclass.extend(/** @lends LuCI.uci.prototype */ {
|
||||
for (let i = 0; i < sa.length; i++)
|
||||
this.get(conf, sa[i]['.name'])['.index'] = i;
|
||||
|
||||
this.state.reorder[conf] = true;
|
||||
if (this.state)
|
||||
this.state.reorder[conf] = true;
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user