Skip to content

Commit

Permalink
Block Library: Fix error in useClientWidth (#43585)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka authored Aug 25, 2022
1 parent f129ed1 commit 0c15085
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/image/use-client-width.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function useClientWidth( ref, dependencies ) {
const [ clientWidth, setClientWidth ] = useState();

function calculateClientWidth() {
setClientWidth( ref.current.clientWidth );
setClientWidth( ref.current?.clientWidth );
}

useEffect( calculateClientWidth, dependencies );
Expand Down

0 comments on commit 0c15085

Please sign in to comment.