From 87509073e040cedf1e1ae8137fb00a20c0f97c9e Mon Sep 17 00:00:00 2001 From: Milorad Filipovic Date: Mon, 14 Nov 2022 09:19:39 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8C=20Handling=20`undefined`=20possibi?= =?UTF-8?q?lity=20in=20action=20dropdown=20blur=20event?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/N8nActionDropdown/ActionDropdown.vue | 2 +- .../src/components/ExecutionsView/ExecutionPreview.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/design-system/src/components/N8nActionDropdown/ActionDropdown.vue b/packages/design-system/src/components/N8nActionDropdown/ActionDropdown.vue index 60da96e64bbd8..13663cfb1770d 100644 --- a/packages/design-system/src/components/N8nActionDropdown/ActionDropdown.vue +++ b/packages/design-system/src/components/N8nActionDropdown/ActionDropdown.vue @@ -93,7 +93,7 @@ export default Vue.extend({ this.$emit('select', action); }, onButtonBlur(event: FocusEvent): void { - const elementDropdown = this.$refs.elementDropdown as Vue & { hide: () => void }; + const elementDropdown = this.$refs.elementDropdown as Vue & { hide: () => void } | undefined; // Hide dropdown when clicking outside of current document if (elementDropdown && event.relatedTarget === null) { elementDropdown.hide(); diff --git a/packages/editor-ui/src/components/ExecutionsView/ExecutionPreview.vue b/packages/editor-ui/src/components/ExecutionsView/ExecutionPreview.vue index bc8d3c4461989..8061c7beebced 100644 --- a/packages/editor-ui/src/components/ExecutionsView/ExecutionPreview.vue +++ b/packages/editor-ui/src/components/ExecutionsView/ExecutionPreview.vue @@ -110,7 +110,7 @@ export default mixins(restApi, showMessage, executionHelpers).extend({ }, onRetryButtonBlur(event: FocusEvent): void { // Hide dropdown when clicking outside of current document - const retryDropdown = this.$refs.retryDropdown as Vue & { hide: () => void }; + const retryDropdown = this.$refs.retryDropdown as Vue & { hide: () => void } | undefined; if (retryDropdown && event.relatedTarget === null) { retryDropdown.hide(); }