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 (
18
18
const sizeStyle : React . CSSProperties = { } ;
19
19
20
20
if ( stretch ) {
21
+ const { width, height } = targetSize ;
22
+
21
23
// 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 ;
26
28
}
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 ;
31
33
}
32
34
}
33
35
You can’t perform that action at this time.
0 commit comments