summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/request/node_modules/caseless/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/request/node_modules/caseless/index.js')
-rw-r--r--deps/npm/node_modules/request/node_modules/caseless/index.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/deps/npm/node_modules/request/node_modules/caseless/index.js b/deps/npm/node_modules/request/node_modules/caseless/index.js
index d86a70eca1..b194734ee4 100644
--- a/deps/npm/node_modules/request/node_modules/caseless/index.js
+++ b/deps/npm/node_modules/request/node_modules/caseless/index.js
@@ -36,6 +36,7 @@ Caseless.prototype.get = function (name) {
}
Caseless.prototype.swap = function (name) {
var has = this.has(name)
+ if (has === name) return
if (!has) throw new Error('There is no header than matches "'+name+'"')
this.dict[name] = this.dict[has]
delete this.dict[has]