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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user