mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 14:11:23 -04:00
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:
parent
095f4a0510
commit
6ab6e489f6
1 changed files with 1 additions and 1 deletions
|
@ -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'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue