Skip to content
Snippets Groups Projects
Commit 70b9a32c authored by chris's avatar chris
Browse files

remove unused check

parent 2851602e
No related branches found
No related tags found
No related merge requests found
import { ProseEditorOverlayTools, documentHelpers } from 'substance' import { ProseEditorOverlayTools } from 'substance'
import { each, includes, keys } from 'lodash' import { each, includes, keys } from 'lodash'
class Overlay extends ProseEditorOverlayTools { class Overlay extends ProseEditorOverlayTools {
render ($$) { render ($$) {
const surface = this.getSurface() 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() const commandStates = this.context.commandManager.getCommandStates()
each(keys(commandStates), (key) => { each(keys(commandStates), (key) => {
const allowed = ['comment', 'save'] const allowed = ['comment', 'save']
......
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