diff --git a/app/components/SimpleEditor/Overlay.js b/app/components/SimpleEditor/Overlay.js index 697ddb61af5062defb434f62d3d565c3a39644de..e32def516d9eb11cda23b3ab74f04fb4941861a9 100644 --- a/app/components/SimpleEditor/Overlay.js +++ b/app/components/SimpleEditor/Overlay.js @@ -1,18 +1,11 @@ -import { ProseEditorOverlayTools, documentHelpers } from 'substance' +import { ProseEditorOverlayTools } from 'substance' import { each, includes, keys } from 'lodash' class Overlay extends ProseEditorOverlayTools { render ($$) { const surface = this.getSurface() - const session = this.context.documentSession - const sel = session.getSelection() - const comment = documentHelpers.getPropertyAnnotationsForSelection( - session.getDocument(), - sel, - { type: 'commnent' } - ) - if (surface && surface.props.canNotEdit && typeof comment[0] === 'undefined') { + if (surface && surface.props.canNotEdit) { const commandStates = this.context.commandManager.getCommandStates() each(keys(commandStates), (key) => { const allowed = ['comment', 'save']