Is there a way to reject an update for a Doc?

Hi guys! I’ve been working on a demo and I’m having some weird issue where the document for some reason is emptied out, it is most likely my own fault but I’d like to create a safeguard both server level and client level.

My documents will never be empty, it will have always a property to it, so I’d like to reject any update to a document when its emptied out. is this possible?

I’m using hocuspocus and tiptap, so far everythings great and I love the work you do, thanks.

Hi @ElHex ,

You could use the undo-manager to revert updates. But I advise against it. It would be better to find the actual cause.

If you still want to try the UndoManager, there is an example in the Yjs test cases (commit from a couple of weeks ago).