Skip to content

Commit

Permalink
fix 244
Browse files Browse the repository at this point in the history
Former-commit-id: 090f70e
Former-commit-id: e9ca4e5
Former-commit-id: 3b3ae48
Former-commit-id: 8b4e7322cf56c3ee1b86785e455a52af38ed6442 [formerly fca7c2263e116ae2c91c483c986f3ba6904bd48f]
Former-commit-id: 423908cf32625f2c5bd374ce5c298038c914560b
Former-commit-id: aad33feba903ccdad8bd59d5c68e036578c2eddb
Former-commit-id: ecec60dbf286d5f11828eafdbb3886df15af368f
Former-commit-id: 08197b214676b116159c19bc5ae994d494ea4771
Former-commit-id: 7dee5f3deccc9b1c635c7d1af37af4ec96f1c90a
  • Loading branch information
FairyEver committed Nov 23, 2019
1 parent 949d55e commit ecc43fd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/mock/d2-mock/patch/withCredentials.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ export default function (Mock) {
// http://cnine.me/note/FrontEnd/mock-lose-cookies-dbg.html
Mock.XHR.prototype.__send = Mock.XHR.prototype.send
Mock.XHR.prototype.send = function () {
if (this.custom.xhr) this.custom.xhr.withCredentials = this.withCredentials || false
if (this.custom.xhr) {
this.custom.xhr.withCredentials = this.withCredentials || false
this.custom.xhr.responseType = this.responseType
}
this.__send.apply(this, arguments)
}
}

0 comments on commit ecc43fd

Please sign in to comment.