Merge pull request #190 from erwin314/master

Fixed: Check if variable is plain object before using isEmptyObject()
pull/2/head
Kevan Ahlquist 2016-03-23 00:13:49 -05:00
commit a25829bbd9
1 changed files with 1 additions and 1 deletions

View File

@ -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];
}
}