Skip to content

Commit

Permalink
fix infinite loop in text editor window
Browse files Browse the repository at this point in the history
  • Loading branch information
HaruHunab1320 committed Jun 17, 2024
1 parent c867a0b commit 52eaf00
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ const TextEditor = () => {
const formattedCode = code.replace('\r\n', '\n')
if (formattedCode === activeInput.value) return

if (activeInput) {
if (selectedNode.id === activeInput.nodeId) {
dispatch(setActiveInput({ ...activeInput, value: formattedCode }))
}
}, [debouncedCode, activeInput, selectedNode])
}, [code, activeInput, selectedNode, dispatch])

// Handles loading the code from selected node if a text editor data node
useEffect(() => {
Expand Down

0 comments on commit 52eaf00

Please sign in to comment.