Skip to content
Snippets Groups Projects
Commit c883a05b authored by chris's avatar chris Committed by john
Browse files

remove minieditorsession

parent 36d9008f
No related branches found
No related tags found
No related merge requests found
......@@ -243,7 +243,6 @@ class Editor extends ProseEditor {
// notes provider
const notesProvider = new NotesProvider(doc, {
miniEditorSession: '',
miniEditorContext: ''
})
......
......@@ -15,7 +15,6 @@ class MiniEditor extends ProseEditor {
didMount () {
const provider = this.getProvider()
provider.config.miniEditorContext = this.getChildContext()
provider.config.miniEditorSession = this.editorSession
this.editorSession.onUpdate('document', this.findNote, this)
this.on('noteSelected', this.scrollTo, this)
this.on('notes:inserted', this.createNote, this)
......
......@@ -283,7 +283,11 @@ class CommentsProvider extends TocProvider {
}
getMiniDocument () {
return this.config.controller.context.notesProvider.config.miniEditorSession.document
const notesProvider = this.config.controller.context.notesProvider
const miniEditorContext = notesProvider.config.miniEditorContext
if (!miniEditorContext) return
return miniEditorContext.editorSession.document
}
isSelectionLargerThanComments () {
......
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