fix(android): crash problem while loading local html resource (#1010)

This commit is contained in:
小米-余乐 2019-11-12 17:05:29 +08:00 committed by Thibault Malbranche
parent b92d6ae014
commit 05c286fc23
1 changed files with 1 additions and 1 deletions

View File

@ -278,7 +278,7 @@ class WebView extends React.Component<AndroidWebViewProps, State> {
const webViewStyles = [styles.container, styles.webView, style];
const webViewContainerStyle = [styles.container, containerStyle];
if (source && 'method' in source) {
if (typeof source !== "number" && source && 'method' in source) {
if (source.method === 'POST' && source.headers) {
console.warn(
'WebView: `source.headers` is not supported when using POST.',