Skip to content
Commit c608a15a authored by Daniel Nilsson's avatar Daniel Nilsson Committed by Paul Donald
Browse files

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: default avatarDaniel Nilsson <daniel.nilsson94@outlook.com>
parent 374af8b5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment