Skip to content

Commit

Permalink
fix: Add null check
Browse files Browse the repository at this point in the history
  • Loading branch information
memoyil committed Jan 14, 2025
1 parent 25d2a4e commit 89370e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/canonical-bridge/src/views/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]*$')
Expand Down

0 comments on commit 89370e8

Please sign in to comment.