fix: Invariant violation with addToArchive called with non-model (#9672)

This commit is contained in:
Tom Moor authored and GitHub committed 2025-07-18 07:45:48 -04:00
1 parent ccac9379ca
commit 697bca9932
1 file changed
+2 -1
+2 -1
View File
@@ -285,7 +285,8 @@ class WebsocketProvider extends Component<Props> {
this.socket.on(
"documents.archive",
action((event: PartialExcept<Document, "id">) => {
documents.addToArchive(event as Document);
const model = documents.add(event);
documents.addToArchive(model);
if (event.collectionId) {
const collection = collections.get(event.collectionId);