fix(editor): Fix incorrect node type version selection on new canvas (no-changelog) (#10412)

This commit is contained in:
Alex Grozav 2024-08-15 11:23:22 +03:00 committed by GitHub
parent d98e29e3d5
commit 6bb57108a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -444,7 +444,8 @@ export function useCanvasOperations({ router }: { router: ReturnType<typeof useR
}
const nodesWithTypeVersion = nodes.map((node) => {
const typeVersion = resolveNodeVersion(requireNodeTypeDescription(node.type));
const typeVersion =
node.typeVersion ?? resolveNodeVersion(requireNodeTypeDescription(node.type));
return {
...node,
typeVersion,
@ -478,6 +479,7 @@ export function useCanvasOperations({ router }: { router: ReturnType<typeof useR
);
} catch (error) {
toast.showError(error, i18n.baseText('error'));
console.error(error);
continue;
}