Skip to content

Commit

Permalink
[dashboard] (#4515)
Browse files Browse the repository at this point in the history
  • Loading branch information
Grace Guo committed Mar 1, 2018
1 parent 79bb54a commit 2637d3d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions superset/assets/javascripts/dashboard/reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2637d3d

Please sign in to comment.