From d2b2c1a08d153591adfdb1294a950f2c19cff6cf Mon Sep 17 00:00:00 2001 From: afsuyadi Date: Sat, 30 May 2026 14:59:05 +0700 Subject: [PATCH 1/2] fix(sentry-frontend): prevent error when inputRef is undefined --- frontend/web/components/pages/CreateOrganisationPage.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/web/components/pages/CreateOrganisationPage.tsx b/frontend/web/components/pages/CreateOrganisationPage.tsx index 3c47c7eb72ff..a6e669c97e02 100644 --- a/frontend/web/components/pages/CreateOrganisationPage.tsx +++ b/frontend/web/components/pages/CreateOrganisationPage.tsx @@ -66,7 +66,9 @@ const CreateOrganisationPage: React.FC = () => { useEffect(() => { API.trackPage(Constants.pages.CREATE_ORGANISATION) focusTimeout.current = setTimeout(() => { - inputRef.current?.focus() + if (inputRef.current && typeof inputRef.current.focus === 'function') { + inputRef.current.focus() + } focusTimeout.current = null }, 500) From f7634bc57734a5a34431ae5bfd36e9d5ccea3053 Mon Sep 17 00:00:00 2001 From: afsuyadi Date: Sat, 30 May 2026 17:46:54 +0700 Subject: [PATCH 2/2] fix(sentry-frontend): refine code to be more cleaner --- frontend/web/components/pages/CreateOrganisationPage.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/web/components/pages/CreateOrganisationPage.tsx b/frontend/web/components/pages/CreateOrganisationPage.tsx index a6e669c97e02..a2d860a05556 100644 --- a/frontend/web/components/pages/CreateOrganisationPage.tsx +++ b/frontend/web/components/pages/CreateOrganisationPage.tsx @@ -66,9 +66,7 @@ const CreateOrganisationPage: React.FC = () => { useEffect(() => { API.trackPage(Constants.pages.CREATE_ORGANISATION) focusTimeout.current = setTimeout(() => { - if (inputRef.current && typeof inputRef.current.focus === 'function') { - inputRef.current.focus() - } + inputRef.current?.focus?.() focusTimeout.current = null }, 500)