diff --git a/docs/zh_CN/index.md b/docs/zh_CN/index.md index 5988698fe..371fc55bf 100644 --- a/docs/zh_CN/index.md +++ b/docs/zh_CN/index.md @@ -13,7 +13,7 @@ SuperAgent是轻量级的渐进式ajax API,具有灵活性、可读性和较 ## 测试文档 -[**English**](/) +[**English**](/superagent/) 下面的[测试文档](../test.html)是用[Mocha](https://mochajs.org/)的"文档"报告器生成的,并直接反映了测试套件。 这提供了额外的文档来源。 diff --git a/src/request-base.js b/src/request-base.js index dc564a2d6..0922636f7 100644 --- a/src/request-base.js +++ b/src/request-base.js @@ -17,7 +17,7 @@ module.exports = RequestBase; * @api public */ -function RequestBase() {} +function RequestBase() { } /** * Clear previous timeout. @@ -460,7 +460,10 @@ RequestBase.prototype.field = function (name, value, options) { value = String(value); } - this._getFormData().append(name, value, options); + //fix https://github.com/visionmedia/superagent/issues/1680 + if (options) this._getFormData().append(name, value, options); + else this._getFormData().append(name, value); + return this; };