PolyGerrit: Bug fix for iOS 10.3 and mac 10.12.4
https://bugs.webkit.org/show_bug.cgi?id=169970
There seems to be a bug in iOS 10.3 that if the header is undefined
everything fails. That's fixed in safari 10.2 which is not in safari 10.1
on iOS 10.3.
We can revert this when the fix makes it into iOS 10.3.
Bug: Issue 5715
Change-Id: I7c027b5bf90c67d15541188120b202aa965cf1d5
(cherry picked from commit 3714033622)
This commit is contained in:
committed by
David Pursehouse
parent
5db0e6f26c
commit
819343f9c9
@@ -114,10 +114,14 @@
|
||||
fetchJSON: function(url, opt_errFn, opt_cancelCondition, opt_params,
|
||||
opt_opts) {
|
||||
opt_opts = opt_opts || {};
|
||||
// Issue 5715, This can be reverted back once
|
||||
// iOS 10.3 and mac os 10.12.4 has the fetch api fix.
|
||||
var fetchOptions = {
|
||||
credentials: 'same-origin',
|
||||
headers: opt_opts.headers,
|
||||
credentials: 'same-origin'
|
||||
};
|
||||
if (opt_opts.headers !== undefined) {
|
||||
fetchOptions['headers'] = opt_opts.headers;
|
||||
}
|
||||
|
||||
var urlWithParams = this._urlWithParams(url, opt_params);
|
||||
return fetch(urlWithParams, fetchOptions).then(function(response) {
|
||||
|
||||
Reference in New Issue
Block a user