1
0
mirror of https://github.com/bitwarden/browser synced 2024-12-25 01:22:26 +01:00

[PM-1195] Creating a copy of 'this' on ToJson so that it doesn't change the current view. (#5062)

This commit is contained in:
aj-rosado 2023-03-27 11:48:46 +01:00 committed by GitHub
parent a931f5b9bd
commit 846b15d6d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,9 +68,12 @@ export class SendView implements View {
}
toJSON() {
return Utils.merge(this, {
key: Utils.fromBufferToB64(this.key),
});
return Utils.merge(
{ ...this },
{
key: Utils.fromBufferToB64(this.key),
}
);
}
static fromJSON(json: DeepJsonify<SendView>) {