From 61e8aa6e6f17a9abed106432c6bf9429b68bf6de Mon Sep 17 00:00:00 2001 From: Gabriel Oliveira Date: Mon, 2 Dec 2024 16:02:40 +0000 Subject: [PATCH] fix: prevent calling focus when element is undefined --- .../public/javascripts/countly/vue/components/content.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/express/public/javascripts/countly/vue/components/content.js b/frontend/express/public/javascripts/countly/vue/components/content.js index 2ebd538aa26..fedea228047 100644 --- a/frontend/express/public/javascripts/countly/vue/components/content.js +++ b/frontend/express/public/javascripts/countly/vue/components/content.js @@ -224,7 +224,9 @@ } }, onViewEntered: function() { //? - this.$refs.rootEl.focus(); + if (this.$refs.rootEl) { + this.$refs.rootEl.focus(); + } } }, created: function() {