diff options
author | Daniel Nilsson <daniel.nilsson94@outlook.com> | 2024-02-28 23:12:55 +0100 |
---|---|---|
committer | Paul Donald <itsascambutmailmeanyway@gmail.com> | 2024-03-19 17:22:44 +0100 |
commit | c608a15a9c53a19654f5a36ba2056a7a1eb561da (patch) | |
tree | f6aaa47d4dc22d6ac77d4322d9109b8c6bbdf6f9 /applications/luci-app-pbr/htdocs/luci-static/resources | |
parent | 374af8b522796424e2b915a4113ed37d22ae653c (diff) |
luci-app-attendedsysupgrade: don't reassign data and firmware info
The reassignment of the variable that holds the package information once you get a response from the sysupgrade server caused the package list (which is only loaded once when entering the app) to become an array instead of an object (since that's how the response is structured), which gave the result of once cancelling the firmware upgrade, the package list is now an array, making the package list unusable.
This commit updates the variables that shouldn't be changed (data and firmware) to constants and all handle methods to take these values as parameters instead, allowing us to avoid the possible reassignment which will otherwise result in unexpected control flows.
Ref: #6284
Signed-off-by: Daniel Nilsson <daniel.nilsson94@outlook.com>
Diffstat (limited to 'applications/luci-app-pbr/htdocs/luci-static/resources')
0 files changed, 0 insertions, 0 deletions