mirror of
https://github.com/Foltik/Shimapan
synced 2024-11-28 05:26:44 -05:00
Add hasOwnProperty checks to ApiSvc
This commit is contained in:
parent
8b06a715cd
commit
9e36c3c244
@ -28,7 +28,8 @@ angular.module('ApiSvc', []).service('ApiService', ['$http', function ($http) {
|
|||||||
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: {key: key.key}
|
data: {key: key.key}
|
||||||
@ -45,7 +46,8 @@ angular.module('ApiSvc', []).service('ApiService', ['$http', function ($http) {
|
|||||||
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: key
|
data: key
|
||||||
|
Loading…
Reference in New Issue
Block a user