Skip to content

Commit

Permalink
[dashboard] (apache#4515)
Browse files Browse the repository at this point in the history
  • Loading branch information
Grace Guo authored and michellethomas committed May 23, 2018
1 parent 9fe6f49 commit edf99ad
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 edf99ad

Please sign in to comment.