fix crash if no node

This commit is contained in:
pythongosssss
2023-08-05 12:52:13 +01:00
parent 1bc7d9b873
commit 8cae63f2b6
+1 -1
View File
@@ -187,7 +187,7 @@ app.registerExtension({
Object.defineProperty(nodeType, "title_mode", {
get() {
return app.canvas.current_node.widgets?.length ? LiteGraph.NORMAL_TITLE : LiteGraph.NO_TITLE;
return app.canvas.current_node?.widgets?.length ? LiteGraph.NORMAL_TITLE : LiteGraph.NO_TITLE;
},
});