mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-11 01:33:58 +02:00
update comment for clarity
This commit is contained in:
@@ -102,8 +102,9 @@ class Node extends React.Component {
|
|||||||
// If the node has changed, update. PERF: There are certain cases where the
|
// If the node has changed, update. PERF: There are certain cases where the
|
||||||
// node instance will have changed, but it's properties will be exactly the
|
// node instance will have changed, but it's properties will be exactly the
|
||||||
// same (copy-paste, delete backwards, etc.) in which case this will not
|
// same (copy-paste, delete backwards, etc.) in which case this will not
|
||||||
// catch a potentially avoidable re-render. But those cases should be much
|
// catch a potentially avoidable re-render. But those cases are rare enough
|
||||||
// rarer than trying to deeply evaluate any changes in all nodes.
|
// that they aren't really a drag on performance, so for simplicity we just
|
||||||
|
// let them through.
|
||||||
if (nextProps.node != this.props.node) {
|
if (nextProps.node != this.props.node) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user