1
0
mirror of https://github.com/Foltik/Shimapan synced 2024-11-30 22:41:47 -05:00

Add hasOwnProperty checks to AuthSvc

This commit is contained in:
Jack Foltz 2018-01-13 17:36:40 -05:00
parent 86b7de2039
commit bf2eb3b251
Signed by: foltik
GPG Key ID: 303F88F996E95541

View File

@ -9,7 +9,8 @@ angular.module('AuthSvc', []).service('AuthService', ['$http', '$window', functi
transformRequest: function(obj) { transformRequest: function(obj) {
var str = []; var str = [];
for (var p in obj) for (var p in obj)
str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); if (obj.hasOwnProperty(p))
str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
return str.join("&"); return str.join("&");
}, },
data: user data: user
@ -36,7 +37,8 @@ angular.module('AuthSvc', []).service('AuthService', ['$http', '$window', functi
transformRequest: function(obj) { transformRequest: function(obj) {
var str = []; var str = [];
for (var p in obj) for (var p in obj)
str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); if (obj.hasOwnProperty(p))
str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
return str.join("&"); return str.join("&");
}, },
data: user data: user