[whatwg/url] Weird URLSearchParams delete issue (#184)

```js
const url = new URL("http://domain.com/?var1=value&var2=");
const params = Array.from(url.searchParams);

// There is no `.clear()`
for (let param of url.searchParams) {
  console.log( param[0] );
  url.searchParams.delete( param[0] );
}
```
The above only logs "var1"; never "var2".

However, it logs if we remove the `delete()` line:
```js
const url = new URL("http://domain.com/?var1=value&var2=");
const params = Array.from(url.searchParams);

// There is no `.clear()`
for (let param of url.searchParams) {
  console.log( param[0] );
  //url.searchParams.delete( param[0] );
}
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/184

Received on Wednesday, 28 December 2016 04:10:26 UTC