Skip to content

Commit

Permalink
去掉 QQ 浏览器下的特殊处理 (#639)
Browse files Browse the repository at this point in the history
  • Loading branch information
PengXing authored Jul 2, 2019
1 parent e4b9438 commit 3fe7be2
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions packages/mip/src/polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ import 'document-register-element/build/document-register-element.esm'
// import 'deps/document-register-element'

import 'deps/fetch-jsonp'
import {
fetch as polyfillFetch,
Headers as polyfillHeaders,
Request as polyfillRequest,
Response as polyfillResponse
} from 'whatwg-fetch/fetch'
// import {
// fetch as polyfillFetch,
// Headers as polyfillHeaders,
// Request as polyfillRequest,
// Response as polyfillResponse
// } from 'whatwg-fetch/fetch'

import platform from './util/platform'
// import platform from './util/platform'

// 增加 QQ 浏览器的判断,
// 因为 QQ 浏览器的早起版本 fetch 实现有问题,
// 发送请求会漏掉 cookie,
// 因为在 QQ 浏览器中也通过 polyfill 的方式覆盖 fetch
if (platform.isQQ) {
window.fetch = polyfillFetch
window.Headers = polyfillHeaders
window.Request = polyfillRequest
window.Response = polyfillResponse
}
// if (platform.isQQ()) {
// window.fetch = polyfillFetch
// window.Headers = polyfillHeaders
// window.Request = polyfillRequest
// window.Response = polyfillResponse
// }

0 comments on commit 3fe7be2

Please sign in to comment.