From 89370e8aa85b016a44a4b214adc70704d05eeb6e Mon Sep 17 00:00:00 2001 From: memoyil <2213635+memoyil@users.noreply.github.com> Date: Tue, 14 Jan 2025 09:10:04 +0100 Subject: [PATCH] fix: Add null check --- packages/canonical-bridge/src/views/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/canonical-bridge/src/views/index.tsx b/packages/canonical-bridge/src/views/index.tsx index fc3683c9d28c4..6a8cde31fc31b 100644 --- a/packages/canonical-bridge/src/views/index.tsx +++ b/packages/canonical-bridge/src/views/index.tsx @@ -40,7 +40,7 @@ export const CanonicalBridge = (props: CanonicalBridgeProps) => { const { setLastUpdated: refresh } = useLastUpdated() useEffect(() => { - if (typeof document !== 'undefined') { + if (typeof document !== 'undefined' && document) { const inputElement = document.querySelector('.bccb-widget-transfer-input') as HTMLInputElement | null if (inputElement) { inputElement.setAttribute('pattern', '^[0-9]*[.,]?[0-9]*$')