Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Commit

Permalink
fix: fix condition for checking a recovery key
Browse files Browse the repository at this point in the history
  • Loading branch information
gjgd committed Dec 3, 2019
1 parent a58961d commit 8f31d07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/element-lib/src/sidetree-v2/protocol/resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const applyPatch = (didDocument, patch) => {
return patch.publicKeys.reduce((currentState, publicKey) => {
const existingKey = publicKeyMap.get(publicKey);
// Deleting recovery key is NOT allowed.
if (existingKey !== undefined && existingKey.type !== '#recovery') {
if (existingKey !== undefined && existingKey.id !== '#recovery') {
publicKeyMap.delete(publicKey);
return {
...currentState,
Expand Down

0 comments on commit 8f31d07

Please sign in to comment.