SimpleFieldMapper produces extra null value

Created on 12 March 2024, 8 months ago
Updated 6 May 2024, 6 months ago

Problem/Motivation

When evaluating a selector for a multi-valued field, SimpleFieldMapper will generate an extra "null" value.

Steps to reproduce

{
  "events": [
    {"id": "a", title: "foo"},
    {"id": "b", title: "bar"}
  ]
}
  1. Retrieve an external entity with a multi-valued field, e.g. "events".
  2. Configure a simple field mapping: events/*/id
  3. SimpleFieldMapper will incorrectly return ["a", "b", null]

Proposed resolution

Fix off-by-one error in for loop.

Remaining tasks

Code review.

🐛 Bug report
Status

RTBC

Version

2.0

Component

Code

Created by

🇩🇪Germany rob_pr

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024