Skip to content

Commit

Permalink
json extension prop is an array (#6866)
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin authored Nov 17, 2023
1 parent a141890 commit 8e92083
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions libs/importer/src/importers/lastpass/access/vault.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8e92083

Please sign in to comment.