Skip to content

Commit

Permalink
Pass processing if doc[field] == null (opendistro-for-elasticsearch#361)
Browse files Browse the repository at this point in the history
Pass processing if doc[field] == null
Based on opendistro-for-elasticsearch#327 (comment)
  • Loading branch information
uzhinskiy authored and zhongnansu committed Jul 1, 2021
1 parent 7b29c62 commit 57cf7a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kibana-reports/server/routes/utils/dataReportHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ function traverse(data, keys, result = {}) {
*/
function sanitize(doc: any) {
for (const field in doc) {
if (doc[field] == null)
continue
if (
doc[field].toString().startsWith('+') ||
doc[field].toString().startsWith('-') ||
Expand Down

0 comments on commit 57cf7a5

Please sign in to comment.