Merge pull request #2 from BlakeOne/fix-for-nodes-without-inputs

fix-for-nodes-without-inputs
This commit is contained in:
BlakeOne
2024-04-21 06:40:31 -07:00
committed by GitHub
+5 -1
View File
@@ -332,7 +332,11 @@ app.registerExtension({
const orig = LGraphCanvas.prototype.getNodeMenuOptions;
LGraphCanvas.prototype.getNodeMenuOptions = function(node) {
const options = orig.call(this, node);
const options = orig.call(this, node);
if (!node.widgets) {
return options;
}
const loadOptions = presetManager.presets[node.type]?.map((preset) => ({
content: preset.name,