superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grace...@apache.org
Subject [incubator-superset] branch master updated: Fix AdhocFilterControl for single metric options (#5012)
Date Tue, 15 May 2018 23:41:29 GMT
This is an automated email from the ASF dual-hosted git repository.

graceguo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new c2eae96  Fix AdhocFilterControl for single metric options (#5012)
c2eae96 is described below

commit c2eae9632705fdc9ff89b67836709b76476a6bec
Author: michellethomas <michelle.q.thomas@gmail.com>
AuthorDate: Tue May 15 16:41:23 2018 -0700

    Fix AdhocFilterControl for single metric options (#5012)
---
 superset/assets/src/explore/components/controls/AdhocFilterControl.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/superset/assets/src/explore/components/controls/AdhocFilterControl.jsx b/superset/assets/src/explore/components/controls/AdhocFilterControl.jsx
index abd8778..3a12c2a 100644
--- a/superset/assets/src/explore/components/controls/AdhocFilterControl.jsx
+++ b/superset/assets/src/explore/components/controls/AdhocFilterControl.jsx
@@ -206,7 +206,7 @@ export default class AdhocFilterControl extends React.Component {
   optionsForSelect(props) {
     const options = [
       ...props.columns,
-      ...[...props.formData.metrics, props.formData.metric].map(metric => (
+      ...[...(props.formData.metrics || []), props.formData.metric].map(metric => (
         metric && (
           typeof metric === 'string' ?
           { saved_metric_name: metric } :

-- 
To stop receiving notification emails like this one, please contact
graceguo@apache.org.

Mime
View raw message