mirror of
https://github.com/outline/outline.git
synced 2026-11-30 17:10:36 +03:00
fix: Views should be recorded for drafts closes #2862
This commit is contained in:
1 parent
8b73f98b9a
commit
e7c3028ef2
2 files changed
+3
-5
No files matched your search
@@ -276,7 +276,7 @@ export default class Document extends BaseModel {
|
||||
@action
|
||||
view = () => {
|
||||
// we don't record views for documents in the trash
|
||||
if (this.isDeleted || !this.publishedAt) {
|
||||
if (this.isDeleted) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,8 +38,7 @@ View.increment = async (where) => {
|
||||
return model;
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(7006) FIXME: Parameter 'documentId' implicitly has an 'any' typ... Remove this comment to see the full error message
|
||||
View.findByDocument = async (documentId) => {
|
||||
View.findByDocument = async (documentId: string) => {
|
||||
return View.findAll({
|
||||
where: {
|
||||
documentId,
|
||||
@@ -54,8 +53,7 @@ View.findByDocument = async (documentId) => {
|
||||
});
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(7006) FIXME: Parameter 'documentId' implicitly has an 'any' typ... Remove this comment to see the full error message
|
||||
View.findRecentlyEditingByDocument = async (documentId) => {
|
||||
View.findRecentlyEditingByDocument = async (documentId: string) => {
|
||||
return View.findAll({
|
||||
where: {
|
||||
documentId,
|
||||
|
||||
Reference in new issue
Block a user