fix(editor): Do not break NDV for version-less nodes (#8714)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-02-22 15:37:29 +01:00
committed by GitHub
parent 246f8cfcc3
commit 8a88d15684
3 changed files with 44 additions and 47 deletions

View File

@@ -157,7 +157,7 @@
$locale.baseText('nodeSettings.nodeVersion', {
interpolate: {
node: nodeType?.displayName as string,
version: node.typeVersion.toString(),
version: (node.typeVersion ?? latestVersion).toString(),
},
})
}}
@@ -284,7 +284,7 @@ export default defineComponent({
return Math.max(...this.nodeTypeVersions);
},
isLatestNodeVersion(): boolean {
return this.latestVersion === this.node?.typeVersion;
return !this.node?.typeVersion || this.latestVersion === this.node.typeVersion;
},
nodeVersionTag(): string {
if (!this.nodeType || this.nodeType.hidden) {