function getName (node) {
    return node.parent
      ? ((node.parent.type === 'array') ? node.index : node.field)
      : (node.field || node.type)
  }
Update TreePath components
@param {Array<Node>} pathNodes list of nodes in path from root to selection
@private