Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Commit

Permalink
Guard against null ref
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgan Laco committed Oct 2, 2018
1 parent 1196ac5 commit 7483728
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ storiesOf("TextField", module)
borderRadius: 4,
borderColor: "hotpink",
}}
forwardedRef={ref => ref && ref.focus()}
forwardedRef={ref => ref && ref.focus && ref.focus()}
onFocus={() => console.tron.log("focus")}
/>
)}
Expand Down

0 comments on commit 7483728

Please sign in to comment.