import getFlatTreeNode from "./getFlatTreeNode";

// 根据id, 取出此id的父级节点
function getFlatTreeParentNode(tree, id) {
  var _getFlatTreeNode;
  var parentId = (_getFlatTreeNode = getFlatTreeNode(tree, id)) === null || _getFlatTreeNode === void 0 ? void 0 : _getFlatTreeNode.parentid;
  if (parentId) {
    return getFlatTreeNode(tree, parentId);
  }
  return null;
}
export default getFlatTreeParentNode;