Skip to content

Commit

Permalink
Rewrite hasExpressionData function to use -some- call
Browse files Browse the repository at this point in the history
  • Loading branch information
ntran18 committed Nov 30, 2024
1 parent eed34ff commit e94143a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions web-client/public/js/graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -1235,12 +1235,7 @@ export var drawGraph = function (workbook) {
};

const hasExpressionData = sheets => {
for (var property in sheets) {
if (property.match(ENDS_IN_EXPRESSION_REGEXP)) {
return true;
}
}
return false;
return Object.keys(sheets).some(property => property.match(ENDS_IN_EXPRESSION_REGEXP));
};

if (!$.isEmptyObject(workbook.expression) && hasExpressionData(workbook.expression) &&
Expand Down

0 comments on commit e94143a

Please sign in to comment.