|
@@ -122,8 +122,8 @@ export default class AutoHeightWebView extends PureComponent {
|
122
|
122
|
const { height: oldHeight, width: oldWidth, source: prevSource, script: prevScript } = state;
|
123
|
123
|
const { style } = props;
|
124
|
124
|
const { source, script } = getUpdatedState(props, getBaseScript);
|
125
|
|
- const height = style && style.height ? style.height : null;
|
126
|
|
- const width = style && style.width ? style.width : null;
|
|
125
|
+ const height = style ? style.height : null;
|
|
126
|
+ const width = style ? style.width : null;
|
127
|
127
|
if (source.html !== prevSource.html || source.uri !== prevSource.uri || script !== prevScript) {
|
128
|
128
|
return {
|
129
|
129
|
source,
|
|
@@ -133,8 +133,8 @@ export default class AutoHeightWebView extends PureComponent {
|
133
|
133
|
}
|
134
|
134
|
if (isSizeChanged(height, oldHeight, width, oldWidth)) {
|
135
|
135
|
return {
|
136
|
|
- height: height ? height : oldHeight,
|
137
|
|
- width: width ? width : oldWidth,
|
|
136
|
+ height: height || oldHeight,
|
|
137
|
+ width: width || oldWidth,
|
138
|
138
|
isSizeChanged: true
|
139
|
139
|
};
|
140
|
140
|
}
|