Skip to content

Commit

Permalink
fix the issue when rename the file
Browse files Browse the repository at this point in the history
  • Loading branch information
sbsoso0411 committed Jul 11, 2023
1 parent a802393 commit 60f83ac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/main/process/Process.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export default function Process(props: ProcessProps) {
window.document.title = RainbowAppName
} else {
const _file = ffTree[file.uid]
if (!_file) return
const fileData = _file.data as TFileNodeData
if (ffTree[file.uid].data.type === 'html') {
let _title = `${fileData.name}${fileData.ext}`
Expand All @@ -141,7 +142,7 @@ export default function Process(props: ProcessProps) {
window.document.title = `${fileData.name}${fileData.ext}`
}
}
}, [file.uid, nodeTree])
}, [file.uid, nodeTree, ffTree])
// processor-updateOpt
useEffect(() => {
if (updateOpt.parse === true) {
Expand Down Expand Up @@ -560,7 +561,7 @@ export default function Process(props: ProcessProps) {
uids.reverse()
uids.map((uid) => {
const node = _nodeTree[uid]
// if (!node.data.valid) return
if (!node.data.valid) return

node.children = node.children.filter((c_uid) => _nodeTree[c_uid].data.valid)
node.isEntity = node.children.length === 0
Expand Down

0 comments on commit 60f83ac

Please sign in to comment.