fix: Don't make request to record view for deleted document
This commit is contained in:
@@ -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 });
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user