From 6b2dc25059dfee23ec4de043e70938555f71a8c6 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Sat, 4 Jan 2020 22:51:54 -0600 Subject: [PATCH] :bug: Fix errors with unknown nodeTypes --- docker/images/n8n/Dockerfile | 2 +- packages/editor-ui/src/components/NodeSettings.vue | 6 +++--- packages/editor-ui/src/components/mixins/nodeBase.ts | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docker/images/n8n/Dockerfile b/docker/images/n8n/Dockerfile index c6343aedd4..c2a1d2551d 100644 --- a/docker/images/n8n/Dockerfile +++ b/docker/images/n8n/Dockerfile @@ -5,7 +5,7 @@ ARG N8N_VERSION RUN if [ -z "$N8N_VERSION" ] ; then echo "The N8N_VERSION argument is missing!" ; exit 1; fi # Update everything and install needed dependencies -RUN apk add --update graphicsmagick tzdata +RUN apk add --update graphicsmagick tzdata git # # Set a custom user to not have n8n run as root USER root diff --git a/packages/editor-ui/src/components/NodeSettings.vue b/packages/editor-ui/src/components/NodeSettings.vue index 5a4d9c0c99..4189d78c35 100644 --- a/packages/editor-ui/src/components/NodeSettings.vue +++ b/packages/editor-ui/src/components/NodeSettings.vue @@ -3,7 +3,7 @@
- +
@@ -89,8 +89,8 @@ export default mixins( return null; }, nodeTypeDescription (): string { - if (this.nodeType!.description) { - return this.nodeType!.description; + if (this.nodeType && this.nodeType.description) { + return this.nodeType.description; } else { return 'No description found'; } diff --git a/packages/editor-ui/src/components/mixins/nodeBase.ts b/packages/editor-ui/src/components/mixins/nodeBase.ts index bbe9810fd1..ccefba5463 100644 --- a/packages/editor-ui/src/components/mixins/nodeBase.ts +++ b/packages/editor-ui/src/components/mixins/nodeBase.ts @@ -79,8 +79,8 @@ export const nodeBase = mixins(nodeIndex).extend({ maxConnections: -1, endpoint: 'Rectangle', endpointStyle: { - width: nodeTypeData.outputs.length > 2 ? 9 : 10, - height: nodeTypeData.outputs.length > 2 ? 18 : 24, + width: nodeTypeData && nodeTypeData.outputs.length > 2 ? 9 : 10, + height: nodeTypeData && nodeTypeData.outputs.length > 2 ? 18 : 24, fill: '#777', stroke: '#777', lineWidth: 0, @@ -92,7 +92,7 @@ export const nodeBase = mixins(nodeIndex).extend({ maxConnections: -1, endpoint: 'Dot', endpointStyle: { - radius: nodeTypeData.outputs.length > 2 ? 7 : 11, + radius: nodeTypeData && nodeTypeData.outputs.length > 2 ? 7 : 11, fill: '#555', outlineStroke: 'none', },