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
…roid (#88)
  • Loading branch information
iou90 committed Oct 19, 2018
1 parent ce29b11 commit f0b1e7e
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 f0b1e7e

Please sign in to comment.