"src/vscode:/vscode.git/clone" did not exist on "541bb6ee634bb0aa56972a51cce5d1b69fc9b3ce"
Commit 04b42bad authored by hnmr293's avatar hnmr293
Browse files

allow converting optional widgets to inputs

parent 9a270305
...@@ -101,7 +101,7 @@ app.registerExtension({ ...@@ -101,7 +101,7 @@ app.registerExtension({
callback: () => convertToWidget(this, w), callback: () => convertToWidget(this, w),
}); });
} else { } 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)) { if (isConvertableWidget(w, config)) {
toInput.push({ toInput.push({
content: `Convert ${w.name} to input`, content: `Convert ${w.name} to input`,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment