mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
lint: AttributeManager.js use ES6 method for hasAttrib
This commit is contained in:
parent
f86578ffc3
commit
73b3a2dc54
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue