Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Commit

Permalink
Shared: Fix migration when app is first installed (#1098)
Browse files Browse the repository at this point in the history
  • Loading branch information
rajivshah3 authored and laumair committed Feb 18, 2019
1 parent 9a0593d commit 61c4df8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared/storage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ const initialiseSync = (encryptionKey) => {
// Schema version 1 adds (missing) "completed" property to AccountInfoDuringSetup schema
// If onboarding is interrupted on loading (without "completed" property), the wallet throws continuous exceptions
// See #isSettingUpNewAccount in shared/selectors/accounts
if (realm.schemaVersion >= 1) {
if (realm.schemaVersion >= 1 && Realm.schemaVersion(getStoragePath(realm.schemaVersion - 1)) > 0) {
const schema = map(config.schema, (object) => {
// Omit "completed" property from AccountInfoDuringSetup schema because it wasn't defined in schema version 0
if (object.name === 'AccountInfoDuringSetup') {
Expand Down

0 comments on commit 61c4df8

Please sign in to comment.