Skip to content

Bug: missing undefined union in the withMigration account root & profile types #2638

@gdorsi

Description

@gdorsi

Both .root and .profile are currently typed as Type | null.
However, inside withMigration, the code does:

if (account.root === undefined) {
  // ...
}

That's because on the first migration the account.root can be undefined, as special exception over the other situatiuons.

We should provide a special type in withMigration to hint that both account.root and account.profile might be undefined.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions