| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 58d67e2 commit 5a10fe9
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -209,19 +209,20 @@ QueryString.parse = QueryString.decode = function(qs, sep, eq, options) { | |||
| 209 | 209 | return obj; | |
| 210 | 210 | } | |
| 211 | 211 | ||
| 212 | - qs = qs.split(sep); | ||
| 213 | - | ||
| 214 | 212 | var maxKeys = 1000; | |
| 215 | 213 | if (options && typeof options.maxKeys === 'number') { | |
| 216 | 214 | maxKeys = options.maxKeys; | |
| 217 | 215 | } | |
| 218 | 216 | ||
| 219 | - var len = qs.length; | ||
| 220 | 217 | // maxKeys <= 0 means that we should not limit keys count | |
| 221 | - if (maxKeys > 0 && len > maxKeys) { | ||
| 222 | - len = maxKeys; | ||
| 218 | + if (maxKeys > 0) { | ||
| 219 | + qs = qs.split(sep, maxKeys); | ||
| 220 | + } else { | ||
| 221 | + qs = qs.split(sep); | ||
| 223 | 222 | } | |
| 224 | 223 | ||
| 224 | + var len = qs.length; | ||
| 225 | + | ||
| 225 | 226 | var decode = QueryString.unescape; | |
| 226 | 227 | if (options && typeof options.decodeURIComponent === 'function') { | |
| 227 | 228 | decode = options.decodeURIComponent; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments