Skip to content

Commit

Permalink
removed duplicated condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Conglei Shi committed Sep 12, 2018
1 parent 7ebf94c commit c63a52e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset/assets/src/visualizations/BigNumber/adaptor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function transform(data, formData) {
if (supportTrendline) {
const sortedData = [...data].sort((a, b) => a[TIME_COLUMN] - b[TIME_COLUMN]);
bigNumber = sortedData[sortedData.length - 1][metricName];
if (supportTrendline && compareLag > 0) {
if (compareLag > 0) {
const compareIndex = sortedData.length - (compareLag + 1);
if (compareIndex >= 0) {
const compareValue = sortedData[compareIndex][metricName];
Expand Down

0 comments on commit c63a52e

Please sign in to comment.