Allow viewing diff before revision is written (#5399)
This commit is contained in:
11
shared/utils/RevisionHelper.ts
Normal file
11
shared/utils/RevisionHelper.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export class RevisionHelper {
|
||||
/**
|
||||
* Get a static id for the latest revision of a document.
|
||||
*
|
||||
* @param documentId The document to generate an ID for.
|
||||
* @returns The ID of the latest revision of the document.
|
||||
*/
|
||||
static latestId(documentId?: string) {
|
||||
return documentId ? `latest-${documentId}` : "";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user