diff --git a/src/static/js/AttributeManager.js b/src/static/js/AttributeManager.js index 19424b0a7..7a37c8ffc 100644 --- a/src/static/js/AttributeManager.js +++ b/src/static/js/AttributeManager.js @@ -406,7 +406,8 @@ AttributeManager.prototype = _(AttributeManager.prototype).extend({ hasAttrib = this.getAttributeOnSelection(attributeName); } else { const attributesOnCaretPosition = this.getAttributesOnCaret(); - hasAttrib = _.contains(_.flatten(attributesOnCaretPosition), attributeName); + const allAttribs = [].concat(...attributesOnCaretPosition); // flatten + hasAttrib = allAttribs.includes(attributeName); } return hasAttrib; },