adding extra check for string in encodeParams

This commit is contained in:
jaredevantabor
2017-01-13 15:05:33 -08:00
parent 46941dab5d
commit 2af4a2d558

View File

@@ -74,7 +74,9 @@ export default ['$q', 'Rest', 'ProcessErrors', '$rootScope', 'Wait', 'DjangoSear
if (Array.isArray(value)){ if (Array.isArray(value)){
let concated = ''; let concated = '';
angular.forEach(value, function(item){ angular.forEach(value, function(item){
item = item.replace(/"|'/g, ""); if(item && typeof item === 'string') {
item = item.replace(/"|'/g, "");
}
concated += `${key}=${item}&`; concated += `${key}=${item}&`;
}); });
return concated; return concated;