fix: cid is a CID instance already

This commit is contained in:
Derrick Hammer 2023-09-11 14:01:31 -04:00
parent eeb8e35bf9
commit 5227acb287
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 2 deletions

View File

@ -107,7 +107,7 @@ maybeInitDefaultPortals();
const fd = await fs.open(file as string); const fd = await fs.open(file as string);
let cid; let cid: CID;
try { try {
cid = await uploadObject( cid = await uploadObject(
@ -178,7 +178,7 @@ await peerDefer.promise;
let newEntry; let newEntry;
try { try {
newEntry = CID.decode(cid).toRegistryEntry(); newEntry = cid.toRegistryEntry();
} catch (e) { } catch (e) {
console.error("Failed to publish: ", e.message); console.error("Failed to publish: ", e.message);
process.exit(); process.exit();