Skip to content

Commit

Permalink
clean up code style for the pr which fixed updating size issue on And…
Browse files Browse the repository at this point in the history
  • Loading branch information
idealdev00000 committed Oct 19, 2018
1 parent 9d5795d commit 9cd6166
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions autoHeightWebView/index.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ export default class AutoHeightWebView extends PureComponent {
const { height: oldHeight, width: oldWidth, source: prevSource, script: prevScript } = state;
const { style } = props;
const { source, script } = getUpdatedState(props, getBaseScript);
const height = style && style.height ? style.height : null;
const width = style && style.width ? style.width : null;
const height = style ? style.height : null;
const width = style ? style.width : null;
if (source.html !== prevSource.html || source.uri !== prevSource.uri || script !== prevScript) {
return {
source,
Expand All @@ -133,8 +133,8 @@ export default class AutoHeightWebView extends PureComponent {
}
if (isSizeChanged(height, oldHeight, width, oldWidth)) {
return {
height: height ? height : oldHeight,
width: width ? width : oldWidth,
height: height || oldHeight,
width: width || oldWidth,
isSizeChanged: true
};
}
Expand Down

0 comments on commit 9cd6166

Please sign in to comment.