diff options
author | 迷渡 <justjavac@gmail.com> | 2019-04-25 21:29:50 +0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-04-25 09:29:50 -0400 |
commit | 8578ed4e7fcbddcbfb87368529f629ce1aebfebb (patch) | |
tree | 08b06219bfb8e3c261b946a4d50a4afea1d762d1 /js/url_search_params.ts | |
parent | 7fc9d7d62a864d1e6af0e77291a105726f73279c (diff) |
`URLSearchParams` deleting appended multiple (#2201)
Diffstat (limited to 'js/url_search_params.ts')
-rw-r--r-- | js/url_search_params.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/js/url_search_params.ts b/js/url_search_params.ts index 1b4461ed2..9f4621b7b 100644 --- a/js/url_search_params.ts +++ b/js/url_search_params.ts @@ -32,7 +32,7 @@ export class URLSearchParams { */ append(name: string, value: string): void { requiredArguments("URLSearchParams.append", arguments.length, 2); - this.params.push([String(name), value]); + this.params.push([String(name), String(value)]); } /** Deletes the given search parameter and its associated value, @@ -112,6 +112,7 @@ export class URLSearchParams { // set the value of the first such name-value pair to value // and remove the others. name = String(name); + value = String(value); let found = false; let i = 0; while (i < this.params.length) { |