Commit bb8393fa by zhaochengxiang

bug fix

parent 0ccf9793
...@@ -35,6 +35,8 @@ const AssetBrowse = (props) => { ...@@ -35,6 +35,8 @@ const AssetBrowse = (props) => {
const index = (treeList??[]).findIndex(item => item.nodeId === centerId) const index = (treeList??[]).findIndex(item => item.nodeId === centerId)
if (index !== -1) { if (index !== -1) {
setNode(treeList[index]) setNode(treeList[index])
} else {
setNode({ nodeId: centerId, type: 'custom' })
} }
} }
} }
......
...@@ -34,6 +34,8 @@ const FC = (props) => { ...@@ -34,6 +34,8 @@ const FC = (props) => {
const index = (treeList??[]).findIndex(item => item.nodeId === centerId) const index = (treeList??[]).findIndex(item => item.nodeId === centerId)
if (index !== -1) { if (index !== -1) {
setNode(treeList[index]) setNode(treeList[index])
} else {
setNode({ nodeId: centerId, type: 'custom' })
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment