From a33123469a20a683befee5414aea2d7cce9602fe Mon Sep 17 00:00:00 2001 From: Erwin Molendijk Date: Mon, 21 Mar 2016 09:25:40 +0100 Subject: [PATCH] Fixed: Check if variable is plain object before using isEmptyObject() --- app/components/startContainer/startContainerController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/startContainer/startContainerController.js b/app/components/startContainer/startContainerController.js index 354d2d6a3..bc7527be8 100644 --- a/app/components/startContainer/startContainerController.js +++ b/app/components/startContainer/startContainerController.js @@ -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]; } }