From 70b9a32c93cf00e3dbf63215f23c010c2ff10901 Mon Sep 17 00:00:00 2001
From: chris <kokosias@yahoo.gr>
Date: Mon, 5 Dec 2016 14:18:44 +0200
Subject: [PATCH] remove unused check

---
 app/components/SimpleEditor/Overlay.js | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/app/components/SimpleEditor/Overlay.js b/app/components/SimpleEditor/Overlay.js
index 697ddb6..e32def5 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']
-- 
GitLab