Commit e38d0046 authored by Casey Ydenberg's avatar Casey Ydenberg
Browse files

Make Commit prop nullable

parent 829864a7
......@@ -41,7 +41,7 @@ import views from './viewer-views-lw'
export interface ViewerProps {
attributes?: { [key: string]: string }
commit: Commit
commit: Commit | null
doc: ManuscriptNode
getModel: <T extends Model>(id: string) => T | undefined
getManuscript: () => Manuscript
......
......@@ -47,7 +47,7 @@ import toc from '../../plugins/toc'
import rules from '../../rules'
interface PluginProps {
commit: Commit
commit: Commit | null
deleteModel: (id: string) => Promise<string>
getCitationProcessor: GetCitationProcessor
getLibraryItem: (id: string) => BibliographyItem | undefined
......@@ -98,7 +98,7 @@ export default (props: PluginProps) => {
paragraphs(),
placeholder(),
tableEditing(),
track(commit),
track(commit || undefined),
highlights({ setCommentTarget }),
]
}
......
......@@ -28,7 +28,7 @@ interface PluginProps {
getModel: <T extends Model>(id: string) => T | undefined
getManuscript: () => Manuscript
modelMap: Map<string, Model>
commit: Commit
commit: Commit | null
}
export default (props: PluginProps) => {
......@@ -37,6 +37,6 @@ export default (props: PluginProps) => {
elements(),
styles({ getModel, getManuscript, modelMap }),
objects({ getModel, getManuscript }),
track(commit),
track(commit || undefined),
]
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment