Skip to content

Fixes #443 - Migration errors still lost after reload

Anton Smirnov requested to merge 443-migration_errors_still_not_saved into master

Indeed, getting an array from default, pushing a new item into it and passing it as a new value is treated as "save value" (an array pointer is not changed).

In the fix all the arrays as values are updated (and saved) no matter what is the current value (pointer) and it's content.

In the tests the behaviour is different from production as it's a new array set with await EWE.subscriptions.clearMigrationErrors() different from the one in default. So no new test covering it is (easily) possible (as we need to remove await EWE.subscriptions.clearMigrationErrors() from "migrates user subscriptions" test and the tests share the same "before" state and can't be easily separated at the moment).

Tested manually.

Closes #443 (closed)

Merge request reports