diff --git a/packages/slate-react/src/components/node.js b/packages/slate-react/src/components/node.js index d620253ee..2b5faa4a8 100644 --- a/packages/slate-react/src/components/node.js +++ b/packages/slate-react/src/components/node.js @@ -151,7 +151,7 @@ class Node extends React.Component { // If it's a block node with inline children, add the proper `dir` attribute // for text direction. - if (node.object == 'block' && node.nodes.first().object != 'block') { + if (node.isLeafBlock()) { const direction = node.getTextDirection() if (direction == 'rtl') attributes.dir = 'rtl' }