fix: update tool mode toggle behavior in NodeToolbarComponent (#4554)

fix wrong behaviour in toogle

Co-authored-by: Nadir J <31660040+NadirJ@users.noreply.github.com>
This commit is contained in:
anovazzi1 2024-11-12 22:29:50 -03:00 committed by GitHub
commit ac540a0940
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -347,7 +347,7 @@ export default function NodeToolbarComponent({
const [toolMode, setToolMode] = useState(() => {
// Check if tool mode is explicitly set on the node
const hasToolModeProperty = data.node?.tool_mode;
if (hasToolModeProperty !== undefined) {
if (hasToolModeProperty) {
return hasToolModeProperty;
}