1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-25 12:15:18 +01:00

json extension prop is an array (#6866)

This commit is contained in:
Kyle Spearrin 2023-11-17 14:34:08 -05:00 committed by GitHub
parent a141890b09
commit 8e92083188
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,9 +142,11 @@ export class Vault {
);
if (response.status === HttpStatusCode.Ok) {
const json = await response.json();
const k1 = json?.extensions?.LastPassK1 as string;
if (k1 != null) {
return Utils.fromB64ToArray(k1);
if (json?.extensions != null && json.extensions.length > 0) {
const k1 = json.extensions[0].LastPassK1 as string;
if (k1 != null) {
return Utils.fromB64ToArray(k1);
}
}
}
return null;