提交 da97bdb4 编写于 作者: A Alexander Bakum 提交者: Jake Champion

Fix MSIE compatibility

上级 1fce243d
......@@ -256,7 +256,7 @@ function Body() {
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')
}
} else if (contentType.includes('json') && typeof this._bodyInit !== 'string') {
} else if (contentType.indexOf('json') >= 0 && typeof this._bodyInit !== 'string') {
// Always pass a text representation of a non-stringified JSON body
// to `XMLHttpRequest.send` to retain a compatible behavior with the browser.
this._bodyInit = this._bodyText
......
{
"name": "whatwg-fetch",
"description": "A window.fetch polyfill.",
"version": "3.6.0",
"version": "3.6.1",
"main": "./dist/fetch.umd.js",
"module": "./fetch.js",
"repository": "github/fetch",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册