fix: Don't make request to record view for deleted document

This commit is contained in:
Tom Moor
2020-11-30 23:17:39 -08:00
parent 283b479689
commit bde6f4b3c4

View File

@@ -206,6 +206,11 @@ export default class Document extends BaseModel {
@action
view = () => {
// we don't record views for documents in the trash
if (this.isDeleted) {
return;
}
return this.store.rootStore.views.create({ documentId: this.id });
};