Skip to content

Commit 2d7df48

Browse files
committed
Node state fix
1 parent 2cbf994 commit 2d7df48

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/rightSidePanel/settings/TabSettings.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,12 @@ const isLightTheme = computed(
104104
105105
const nodeState = computed({
106106
get(): LGraphNode['mode'] | null {
107-
// For multiple nodes, if all nodes have the same mode, return that mode, otherwise return null
108-
if (nodes.length == 1) {
107+
if (!nodes.length) return null
108+
if (nodes.length === 1) {
109109
return nodes[0].mode
110110
}
111111
112+
// For multiple nodes, if all nodes have the same mode, return that mode, otherwise return null
112113
const mode: LGraphNode['mode'] = nodes[0].mode
113114
if (!nodes.every((node) => node.mode === mode)) {
114115
return null

0 commit comments

Comments
 (0)