const isEmptyParagraph = function isEmptyParagraph(node) {
  if (node.type !== 'paragraph') return false;
  if (node.nodes.length > 1) return false;
  const [firstNode] = node.nodes;
  if (!firstNode.leaves) return false;
  return !firstNode.leaves.some(leaf => leaf.text);
};
export default isEmptyParagraph;