From f6d5f9d6ddd91b8e64cac96c14285c829b6fb0e7 Mon Sep 17 00:00:00 2001 From: Ryan Yurkanin Date: Wed, 6 Sep 2017 22:54:54 -0400 Subject: [PATCH] sCU Changes for #1058 (#1064) * changing up should component update * checking if it has nodes * Update node.js * more flexible checking --- src/components/node.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/node.js b/src/components/node.js index 5847a2e95..7fa013393 100644 --- a/src/components/node.js +++ b/src/components/node.js @@ -111,6 +111,10 @@ class Node extends React.Component { // for simplicity we just let them through. if (nextProps.node != props.node) return true + // If the Node has children that aren't just Text's then allow them to decide + // If they should update it or not. + if (nextProps.node.kind != 'text' && Text.isTextList(nextProps.node.nodes) == false) return true + // If the node is a block or inline, which can have custom renderers, we // include an extra check to re-render if the node either becomes part of, // or leaves, a selection. This is to make it simple for users to show a