From 139ec46628addac1cca09faf2f1755e7553b23df Mon Sep 17 00:00:00 2001 From: Abel Coronado Date: Wed, 13 Jun 2018 16:14:37 +0200 Subject: [PATCH] Sched actions empty attr fixed (#2178) --- src/sunstone/public/app/utils/schedule_action.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sunstone/public/app/utils/schedule_action.js b/src/sunstone/public/app/utils/schedule_action.js index f9b3dbeddc..6902404723 100644 --- a/src/sunstone/public/app/utils/schedule_action.js +++ b/src/sunstone/public/app/utils/schedule_action.js @@ -162,8 +162,10 @@ define(function (require) { var first = $(this).children("td")[0]; if (!$("select", first).html()) { var actionJSON = {}; - actionJSON = JSON.parse($(this).attr("data")); - actionJSON.ID = index; + if ($(this).attr("data")){ + actionJSON = JSON.parse($(this).attr("data")); + actionJSON.ID = index; + } } if (!$.isEmptyObject(actionJSON)) { actionsJSON.push(actionJSON); }; });