Insert document title when pasting internal doc url (#6352)
* refactor * DRY
This commit is contained in:
@@ -180,6 +180,13 @@ export default class DocumentsStore extends Store<Document> {
|
||||
return naturalSort(this.inCollection(collectionId), "title");
|
||||
}
|
||||
|
||||
get(id: string): Document | undefined {
|
||||
return (
|
||||
this.data.get(id) ??
|
||||
this.orderedData.find((doc) => id.endsWith(doc.urlId))
|
||||
);
|
||||
}
|
||||
|
||||
@computed
|
||||
get archived(): Document[] {
|
||||
return orderBy(this.orderedData, "archivedAt", "desc").filter(
|
||||
|
||||
Reference in New Issue
Block a user