Fix comprehension in Parse.cookie

So that it compiles to,

```
if (!(name in result)) {
  result[name] = value;
}
```

instead of,

```
if (!(indexOf.call(result, name) >= 0)) {
  result[name] = value;
}
```

since `result` is an object, not an array.
This commit is contained in:
Arlo Breault 2019-07-05 13:24:02 +02:00
parent 095f4a0510
commit 6ab6e489f6

View file

@ -88,7 +88,7 @@ class Parse
return null if -1 == j return null if -1 == j
name = decodeURIComponent string.substr(0, j).trim() name = decodeURIComponent string.substr(0, j).trim()
value = decodeURIComponent string.substr(j + 1).trim() value = decodeURIComponent string.substr(j + 1).trim()
result[name] = value if !(name in result) result[name] = value if name not of result
result result
# Parse an address in the form 'host:port'. Returns an Object with keys 'host' # Parse an address in the form 'host:port'. Returns an Object with keys 'host'