Skip to content

Commit

Permalink
create copy of read only object
Browse files Browse the repository at this point in the history
  • Loading branch information
jigfox committed Aug 15, 2018
1 parent 2d156eb commit 36c7c36
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions WKWebView.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,11 @@ class WKWebView extends React.Component {
WKWebViewManager.startLoadWithResult(!!shouldStart, event.nativeEvent.lockIdentifier);
});

let source = this.props.source || {};
if (typeof source == 'object') {
source.sendCookies = this.props.sendCookies;
source.customUserAgent =
this.props.customUserAgent || this.props.userAgent;
source.useWKCookieStore = this.props.useWKCookieStore;
}
let source = Object.assign({}, this.props.source || {}, {
sendCookies: this.props.sendCookies,
customUserAgent: this.props.customUserAgent || this.props.userAgent,
useWKCookieStore: this.props.useWKCookieStore,
});

if (this.props.html) {
source.html = this.props.html;
Expand Down

0 comments on commit 36c7c36

Please sign in to comment.