Skip to content

Commit

Permalink
style(app/extend/request.js): Some Comments from Chinese To English i…
Browse files Browse the repository at this point in the history
…n union (#2051)
  • Loading branch information
DongWei authored and dead-horse committed Jan 29, 2018
1 parent 06e7710 commit fa5bdae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/extend/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ module.exports = {
if (!cacheQuery) {
cacheQuery = c[str] = {};
const isQueries = cacheName === _queriesCache;
// querystring.parse 不会解析 a[foo]=1&a[bar]=2 的情况
// `querystring.parse` CANNOT parse something like `a[foo]=1&a[bar]=2`
const query = querystring.parse(str);
for (const key in query) {
if (!key) {
Expand All @@ -165,7 +165,7 @@ module.exports = {
const value = filter(query[key]);
cacheQuery[key] = value;
if (isQueries && RE_ARRAY_KEY.test(key)) {
// 支持兼容 this.queries['key'] => this.queries['key[]']
// `this.queries['key'] => this.queries['key[]']` is compatibly supported
const subkey = key.substring(0, key.length - 2);

if (!cacheQuery[subkey]) {
Expand Down

0 comments on commit fa5bdae

Please sign in to comment.