1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-19 13:41:19 +02:00

Improve rendering performance when schema has no decorators

This commit is contained in:
Samy Pessé
2016-11-03 11:22:47 +01:00
parent a3b7b0789f
commit d6beed6744

View File

@@ -313,7 +313,7 @@ class Node extends React.Component {
renderText = () => {
const { node, schema, state } = this.props
const { document } = state
const decorators = document.getDescendantDecorators(node.key, schema)
const decorators = schema.hasDecorators ? document.getDescendantDecorators(node.key, schema) : []
const ranges = node.getRanges(decorators)
let offset = 0