fix: on existing entry, need to update the entry data

This commit is contained in:
Derrick Hammer 2023-12-17 16:55:35 -05:00
parent c61f2f6127
commit 389a15eef4
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 1 deletions

View File

@ -163,11 +163,13 @@ export async function createEntry(
}
if (existing) {
if (equalBytes(entry.data, cid.toRegistryEntry())) {
const newEntry = cid.toRegistryEntry();
if (equalBytes(entry.data, newEntry)) {
return entry;
}
entry.revision++;
entry.data = newEntry;
}
const signedEntry = signRegistryEntry({
kp: sk,