From 757ba6935862185c850bb9c07604b76c9cda79c7 Mon Sep 17 00:00:00 2001 From: Martin Hradil Date: Thu, 5 Oct 2017 15:16:28 +0000 Subject: [PATCH] Fix whitespace, without duplicating the empty object --- app/assets/javascripts/miq_application.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/miq_application.js b/app/assets/javascripts/miq_application.js index 0487ae0318c..bdc337006f0 100644 --- a/app/assets/javascripts/miq_application.js +++ b/app/assets/javascripts/miq_application.js @@ -1535,13 +1535,19 @@ function rbacGroupLoadTab(id) { } function chartData(type, data, data2) { + var empty = { + data: { + columns: [], + }, + }; + if (type === undefined) { - return {data :{columns: []}}; + return empty; } var config = _.cloneDeep(ManageIQ.charts.c3config[type]); if (config === undefined) { - return {data :{columns: []}}; + return empty; } if (_.isObject(data.miq)) {