From c93411b1e75bc59b174d1256f3108d783eea3264 Mon Sep 17 00:00:00 2001 From: Songyan Ho Date: Thu, 13 Apr 2017 00:40:41 +0800 Subject: [PATCH] Fix for merge string as array (#2597) --- superset/assets/javascripts/dashboard/Dashboard.jsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/superset/assets/javascripts/dashboard/Dashboard.jsx b/superset/assets/javascripts/dashboard/Dashboard.jsx index e8509a5f06320..c3da6df30dbef 100644 --- a/superset/assets/javascripts/dashboard/Dashboard.jsx +++ b/superset/assets/javascripts/dashboard/Dashboard.jsx @@ -189,10 +189,12 @@ export function dashboardContainer(dashboard, datasources) { if (!(sliceId in this.filters)) { this.filters[sliceId] = {}; } - if (!(col in this.filters[sliceId]) || !merge) { - this.filters[sliceId][col] = vals; - } else { - this.filters[sliceId][col] = d3.merge([this.filters[sliceId][col], vals]); + if (!(col in this.filters[sliceId])) { + if (!merge) { + this.filters[sliceId][col] = vals; + } else { + this.filters[sliceId][col] = d3.merge([this.filters[sliceId][col], vals]); + } } if (refresh) { this.refreshExcept(sliceId);