From 8578ed4e7fcbddcbfb87368529f629ce1aebfebb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=B7=E6=B8=A1?= Date: Thu, 25 Apr 2019 21:29:50 +0800 Subject: `URLSearchParams` deleting appended multiple (#2201) --- js/url_search_params.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'js/url_search_params.ts') 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) { -- cgit v1.2.3