From e94143abfbb1bc81b47d0bc5c37d7b0dc8959402 Mon Sep 17 00:00:00 2001 From: ntran18 <108908370+ntran18@users.noreply.github.com> Date: Fri, 29 Nov 2024 23:16:09 -0800 Subject: [PATCH] Rewrite hasExpressionData function to use -some- call --- web-client/public/js/graph.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/web-client/public/js/graph.js b/web-client/public/js/graph.js index d47b6d32..771cb188 100644 --- a/web-client/public/js/graph.js +++ b/web-client/public/js/graph.js @@ -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) &&