1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-30 10:29:48 +02:00

Always return early when schema has no decorators in getDescendantDecorators

This commit is contained in:
Samy Pessé
2016-11-03 11:26:00 +01:00
parent d6beed6744
commit 4cc4535074

View File

@@ -378,6 +378,10 @@ const Node = {
*/
getDescendantDecorators(key, schema) {
if (!schema.hasDecorators) {
return []
}
const descendant = this.assertDescendant(key)
let child = this.getHighestChild(key)
let decorators = []