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: [dashboard] (#4515)
Date Thu, 01 Mar 2018 23:48:07 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 2637d3d  [dashboard] (#4515)
2637d3d is described below

commit 2637d3d5e2d73ed018ddcac444d95dfaa460a8d3
Author: Grace Guo <grace.guo@airbnb.com>
AuthorDate: Thu Mar 1 15:48:04 2018 -0800

    [dashboard] (#4515)
---
 superset/assets/javascripts/dashboard/reducers.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/superset/assets/javascripts/dashboard/reducers.js b/superset/assets/javascripts/dashboard/reducers.js
index 80137c5..bf42532 100644
--- a/superset/assets/javascripts/dashboard/reducers.js
+++ b/superset/assets/javascripts/dashboard/reducers.js
@@ -41,8 +41,9 @@ export function getInitialState(bootstrapData) {
   } else {
     dashboard.position_json = [];
   }
-  const lastRowId = Math.max.apply(null,
-    dashboard.position_json.map(pos => (pos.row + pos.size_y)));
+
+  const lastRowId = Math.max(0, Math.max.apply(null,
+    dashboard.position_json.map(pos => (pos.row + pos.size_y))));
   let newSliceCounter = 0;
   dashboard.slices.forEach((slice) => {
     const sliceId = slice.slice_id;

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

Mime
View raw message