Skip to content

Commit 99dea64

Browse files
committed
fix: Add null check
1 parent 58a68e0 commit 99dea64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/canonical-bridge/src/views/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const CanonicalBridge = (props: CanonicalBridgeProps) => {
4040
const { setLastUpdated: refresh } = useLastUpdated()
4141

4242
useEffect(() => {
43-
if (typeof document !== 'undefined') {
43+
if (typeof document !== 'undefined' && document) {
4444
const inputElement = document.querySelector('.bccb-widget-transfer-input') as HTMLInputElement | null
4545
if (inputElement) {
4646
inputElement.setAttribute('pattern', '^[0-9]*[.,]?[0-9]*$')

0 commit comments

Comments
 (0)