mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 06:49:40 +02:00
Fixed: Check if variable is plain object before using isEmptyObject()
This commit is contained in:
parent
f353dc2c41
commit
a33123469a
1 changed files with 1 additions and 1 deletions
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue