Skip to content

Commit

Permalink
Add width and height as Effect Hook deps
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave authored and retrofox committed Aug 2, 2019
1 parent 3a15d94 commit 167fadb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function BlockPreview( { blocks, settings, srcWidth, srcHeight } ) {
setPreviewAspect( {
paddingTop: aspectPadding + '%',
} );
}, [] );
}, [ srcWidth, srcHeight ] );

return (
<div ref={ previewRef } style={ previewAspect } className="block-editor-block-preview__container" aria-hidden>
Expand Down

0 comments on commit 167fadb

Please sign in to comment.