mirror of
https://github.com/silkimen/cordova-plugin-advanced-http.git
synced 2026-04-24 00:00:03 +08:00
replace all typeof calls
This commit is contained in:
+2
-1
@@ -6,6 +6,7 @@ var validSerializers = ['urlencoded', 'json', 'utf8' ];
|
||||
|
||||
module.exports = {
|
||||
b64EncodeUnicode: b64EncodeUnicode,
|
||||
getTypeOf: getTypeOf,
|
||||
checkHeaders: checkHeaders,
|
||||
onInvalidHeader: onInvalidHeader,
|
||||
checkSerializer: checkSerializer,
|
||||
@@ -45,7 +46,7 @@ function checkHeaders(headers) {
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
key = keys[i];
|
||||
|
||||
if (typeof headers[key] !== 'string') {
|
||||
if (getTypeOf(headers[key]) !== 'String') {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user