mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-29 04:17:41 +02:00
add null check to OrganizationInvite init methods
This commit is contained in:
parent
18706c7f11
commit
8d370acafb
@ -12,10 +12,18 @@ export class OrganizationInvite {
|
||||
token: string;
|
||||
|
||||
static fromJSON(json: Jsonify<OrganizationInvite>) {
|
||||
if (json == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Object.assign(new OrganizationInvite(), json);
|
||||
}
|
||||
|
||||
static fromParams(params: Params): OrganizationInvite {
|
||||
if (params == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Object.assign(new OrganizationInvite(), {
|
||||
email: params.email,
|
||||
initOrganization: params.initOrganization?.toLocaleLowerCase() === "true",
|
||||
|
Loading…
Reference in New Issue
Block a user