From 6ab6e489f630296333005919754755098a8018cf Mon Sep 17 00:00:00 2001 From: Arlo Breault Date: Fri, 5 Jul 2019 13:24:02 +0200 Subject: [PATCH] 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. --- proxy/util.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/util.coffee b/proxy/util.coffee index 61fe6be..5f0461f 100644 --- a/proxy/util.coffee +++ b/proxy/util.coffee @@ -88,7 +88,7 @@ class Parse return null if -1 == j name = decodeURIComponent string.substr(0, j).trim() value = decodeURIComponent string.substr(j + 1).trim() - result[name] = value if !(name in result) + result[name] = value if name not of result result # Parse an address in the form 'host:port'. Returns an Object with keys 'host'