Make Todo notes use CRDT docs directly

This commit is contained in:
Timothy J. Aveni
2026-07-12 21:04:20 -07:00
parent a9a6ef2cf4
commit cef58a7d48
3 changed files with 13 additions and 4 deletions
+2 -2
View File
@@ -65,7 +65,7 @@ export const encodeAutomergeFieldWrite = (value, type) => {
if (isAutomergeFieldDoc(value)) {
return saveAutomergeFieldDoc(value, type);
}
return createAutomergeFieldValue(value, type);
throw new Error("CRDT field writes must use an Automerge document or Camino CRDT envelope");
};
export const normalizeAutomergeFieldValue = (value, type) => encodeAutomergeFieldWrite(value, type);
export const materializeAutomergeFieldValue = (value, type) => loadAutomergeFieldDoc(value, type).value;
@@ -80,4 +80,4 @@ export const mergeAutomergeFieldValues = ({ existing, incoming, type, }) => {
materialized: mergedDoc.value,
};
};
//# sourceMappingURL=crdt-automerge.js.map
//# sourceMappingURL=crdt-automerge.js.map