Skip to content

Commit dbfa34a

Browse files
committed
Merge branch 'BilalBudhani-source-prop-fix' into develop
2 parents 5d43a7b + 0148567 commit dbfa34a

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

webview-bridge/index.android.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,14 @@ var WebViewBridge = React.createClass({
111111
domStorageEnabled = this.props.domStorageEnabledAndroid;
112112
}
113113

114-
let props = {...this.props};
115-
props.source = resolveAssetSource(props.source);
116-
114+
let {source, ...props} = {...this.props};
115+
117116
var webView =
118117
<RCTWebViewBridge
119118
ref={RCT_WEBVIEWBRIDGE_REF}
120119
key="webViewKey"
121120
{...props}
122-
source={source}
121+
source={resolveAssetSource(source)}
123122
style={webViewStyles}
124123
onLoadingStart={this.onLoadingStart}
125124
onLoadingFinish={this.onLoadingFinish}

webview-bridge/index.ios.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,19 +175,16 @@ var WebViewBridge = React.createClass({
175175
}
176176
};
177177

178-
let props = {...this.props};
178+
let {source, ...props} = {...this.props};
179179
delete props.onBridgeMessage;
180180
delete props.onShouldStartLoadWithRequest;
181-
delete props.source;
182-
183-
props.source = resolveAssetSource(props.source);
184181

185182
var webView =
186183
<RCTWebViewBridge
187184
ref={RCT_WEBVIEWBRIDGE_REF}
188185
key="webViewKey"
189186
{...props}
190-
source={source}
187+
source={resolveAssetSource(source)}
191188
style={webViewStyles}
192189
onLoadingStart={this.onLoadingStart}
193190
onLoadingFinish={this.onLoadingFinish}

0 commit comments

Comments
 (0)