feat: set_annotation temporary disabled

This commit is contained in:
cudr
2019-10-12 23:15:02 +03:00
parent 55def80703
commit 242a836ce8
5 changed files with 94 additions and 68 deletions

View File

@@ -17,18 +17,21 @@ const AnnotationSetOp = ({ key, value }: Automerge.Diff) => (map, doc) => {
let op
if (!doc.annotations[key]) {
op = {
type: 'add_annotation',
annotation: map[value]
}
} else {
op = {
type: 'set_annotation',
properties: doc.annotations[key],
newProperties: map[value]
}
/**
* Looks like set_annotation option is broken, temporary disabled
*/
// if (!doc.annotations[key]) {
op = {
type: 'add_annotation',
annotation: map[value]
}
// } else {
// op = {
// type: 'set_annotation',
// properties: toJS(doc.annotations[key]),
// newProperties: map[value]
// }
// }
console.log('opSET!!', key, map[value], op)