allow converting optional widgets to inputs

This commit is contained in:
hnmr293 2023-03-30 21:50:35 +09:00
parent 9a27030519
commit 04b42bad87

View File

@ -101,7 +101,7 @@ app.registerExtension({
callback: () => convertToWidget(this, w),
});
} else {
const config = nodeData?.input?.required[w.name] || [w.type, w.options || {}];
const config = nodeData?.input?.required[w.name] || nodeData?.input?.optional?.[w.name] || [w.type, w.options || {}];
if (isConvertableWidget(w, config)) {
toInput.push({
content: `Convert ${w.name} to input`,