From 09f80e626f34e36ca8d364c92fedaeeb6419958e Mon Sep 17 00:00:00 2001 From: iou90 Date: Tue, 18 Feb 2020 10:42:15 +0800 Subject: [PATCH] Clean up code styles --- .eslintrc.js | 8 ++------ autoHeightWebView/index.js | 6 +----- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index acfefa6..c2cba46 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2,11 +2,7 @@ module.exports = { root: true, extends: '@react-native-community', rules: { - 'prettier/prettier': [ - { - singleQuote: true - } - ], - 'comma-dangle': 'off' + 'comma-dangle': 'off', + 'no-unused-vars': 'error' } }; \ No newline at end of file diff --git a/autoHeightWebView/index.js b/autoHeightWebView/index.js index 141cac6..b667df6 100644 --- a/autoHeightWebView/index.js +++ b/autoHeightWebView/index.js @@ -12,11 +12,7 @@ import { reduceData, getWidth, isSizeChanged, shouldUpdate } from './utils'; const AutoHeightWebView = React.memo( forwardRef((props, ref) => { - const { style, onMessage, onSizeUpdated, scrollEnabledWithZoomedin, scrollEnabled, source } = props; - - if (!source) { - return null; - } + const { style, onMessage, onSizeUpdated, scrollEnabledWithZoomedin, scrollEnabled } = props; let webView = useRef(); useImperativeHandle(ref, () => ({