From 125c84b6b557c63d9e8a5873f3179dfdc786e645 Mon Sep 17 00:00:00 2001 From: Martin Filser Date: Mon, 18 Oct 2021 15:52:37 +0200 Subject: [PATCH] Card Details, Ctrl+Enter at description editing raised an error Console: Uncaught TypeError: can't access property "click", this.find(...) is null --- client/components/cards/cardDescription.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/components/cards/cardDescription.js b/client/components/cards/cardDescription.js index d83735861..c958c335e 100644 --- a/client/components/cards/cardDescription.js +++ b/client/components/cards/cardDescription.js @@ -25,7 +25,10 @@ BlazeComponent.extendComponent({ // Pressing Ctrl+Enter should submit the form 'keydown form textarea'(evt) { if (evt.keyCode === 13 && (evt.metaKey || evt.ctrlKey)) { - this.find('button[type=submit]').click(); + const submitButton = this.find('button[type=submit]'); + if (submitButton) { + submitButton.click(); + } } }, },