Skip to content

Commit

Permalink
Merge pull request #190 from erwin314/master
Browse files Browse the repository at this point in the history
Fixed: Check if variable is plain object before using isEmptyObject()
  • Loading branch information
kevana committed Mar 23, 2016
2 parents f353dc2 + e21af77 commit a25829b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/components/startContainer/startContainerController.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ angular.module('startContainer', ['ui.bootstrap'])

function rmEmptyKeys(col) {
for (var key in col) {
if (col[key] === null || col[key] === undefined || col[key] === '' || $.isEmptyObject(col[key]) || col[key].length === 0) {
if (col[key] === null || col[key] === undefined || col[key] === '' || ($.isPlainObject(col[key]) && $.isEmptyObject(col[key])) || col[key].length === 0) {
delete col[key];
}
}
Expand Down

0 comments on commit a25829b

Please sign in to comment.