From 365d900445b72391f91fc40a2485ab4ba3ac11e8 Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Wed, 21 Aug 2019 11:12:30 -0700 Subject: [PATCH] eliminate CodeMirror cursors on save --- components/Editor.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/Editor.js b/components/Editor.js index f47627d..8affda5 100644 --- a/components/Editor.js +++ b/components/Editor.js @@ -162,10 +162,14 @@ class Editor extends React.Component { }, filter: n => { if (n.className) { - if (String(n.className).indexOf('eliminateOnRender') > -1) { + const className = String(n.className) + if (className.includes('eliminateOnRender')) { return false } - if (String(n.className).indexOf('twitter-png-fix') > -1) { + if (className.includes('CodeMirror-cursors')) { + return false + } + if (className.includes('twitter-png-fix')) { return includeTransparentRow } }