Skip to content

Commit

Permalink
we good?
Browse files Browse the repository at this point in the history
  • Loading branch information
shadrach-tayo committed Dec 13, 2024
1 parent e8f8c4f commit 05f2da4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions desci-repo/src/services/manifestRepo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,20 +331,20 @@ export const getDocumentUpdater = async (documentId: DocumentId) => {
document.manifest.references = [];
}

for (const reference of action.reference) {
for (const reference of action.references) {
if (!document.manifest.references.find((ref) => ref.id === reference.id))
document.manifest.references.push(reference);
}
});
break;
// case 'Set References':
// handle.change((document) => {
// if (!document.manifest.references) {
// document.manifest.references = [];
// }
// document.manifest.references = action.references;
// });
// break;
case 'Set References':
handle.change((document) => {
if (!document.manifest.references) {
document.manifest.references = [];
}
document.manifest.references = action.references;
});
break;
case 'Delete Reference':
if (!action.referenceId) return;
const deletedIdx = latestDocument.manifest.references?.findIndex((ref) => ref.id === action.referenceId);
Expand Down

0 comments on commit 05f2da4

Please sign in to comment.