Skip to content

Commit

Permalink
feat: optimize code
Browse files Browse the repository at this point in the history
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
  • Loading branch information
SuZhou-Joe committed Jan 25, 2024
1 parent 2e2e912 commit 2631173
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions server/parsers/ppl_parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,7 @@ export const PPLParsers: MessageParser = {

if (!ppls.length) return [];

const statsPPLs = ppls;
if (!statsPPLs.length) {
return [];
}

return statsPPLs.map((query) => {
return ppls.map((query) => {
const finalQuery = query
.replace(/`/g, '') // workaround for https://github.com/opensearch-project/dashboards-observability/issues/509, https://github.com/opensearch-project/dashboards-observability/issues/557
.replace(/\bSPAN\(/g, 'span('); // workaround for https://github.com/opensearch-project/dashboards-observability/issues/759
Expand Down

0 comments on commit 2631173

Please sign in to comment.