From 2a031c14c8d1c099c90fecfe7e339c5b69fad14c Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Fri, 30 May 2025 16:58:20 +0300 Subject: [PATCH] fix js error --- app/javascript/submission_form/text_step.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/javascript/submission_form/text_step.vue b/app/javascript/submission_form/text_step.vue index 7cfbd6f0..e6560c72 100644 --- a/app/javascript/submission_form/text_step.vue +++ b/app/javascript/submission_form/text_step.vue @@ -151,8 +151,10 @@ export default { resizeTextarea () { const textarea = this.$refs.textarea - textarea.style.height = 'auto' - textarea.style.height = Math.min(250, textarea.scrollHeight) + 'px' + if (textarea) { + textarea.style.height = 'auto' + textarea.style.height = Math.min(250, textarea.scrollHeight) + 'px' + } }, toggleTextArea () { this.isTextArea = true