File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -18,16 +18,18 @@ export default (
1818 const sizeStyle : React . CSSProperties = { } ;
1919
2020 if ( stretch ) {
21+ const { width, height } = targetSize ;
22+
2123 // Stretch with target
22- if ( stretch . indexOf ( 'height' ) !== - 1 ) {
23- sizeStyle . height = targetSize . height ;
24- } else if ( stretch . indexOf ( 'minHeight' ) !== - 1 ) {
25- sizeStyle . minHeight = targetSize . height ;
24+ if ( stretch . indexOf ( 'height' ) !== - 1 && height ) {
25+ sizeStyle . height = height ;
26+ } else if ( stretch . indexOf ( 'minHeight' ) !== - 1 && height ) {
27+ sizeStyle . minHeight = height ;
2628 }
27- if ( stretch . indexOf ( 'width' ) !== - 1 ) {
28- sizeStyle . width = targetSize . width ;
29- } else if ( stretch . indexOf ( 'minWidth' ) !== - 1 ) {
30- sizeStyle . minWidth = targetSize . width ;
29+ if ( stretch . indexOf ( 'width' ) !== - 1 && width ) {
30+ sizeStyle . width = width ;
31+ } else if ( stretch . indexOf ( 'minWidth' ) !== - 1 && width ) {
32+ sizeStyle . minWidth = width ;
3133 }
3234 }
3335
You can’t perform that action at this time.
0 commit comments