Detect untyped canvas workflow nodes

This commit is contained in:
Codex
2026-05-11 21:04:52 +08:00
parent 4ae03c8caf
commit 1d76cca082

View File

@@ -310,11 +310,7 @@ function isExternalCanvasProject(value: unknown) {
const input = asRecord(value);
const nodes = getExternalNodes(value);
if (nodes.length === 0) return false;
return nodes.some(node => (
!!node
&& typeof node === 'object'
&& typeof (node as { type?: unknown }).type === 'string'
)) || !!input.view || typeof input.projectName === 'string' || typeof input.name === 'string';
return nodes.some(isLikelyExternalNode) || !!input.view || typeof input.projectName === 'string' || typeof input.name === 'string';
}
function getExternalAssetKey(value?: unknown) {