Skip to content

fix: custom getter should return arrays

Jean-Baptiste Pasquier requested to merge fix/custom-getter-arrays into master
{
  "somefield": ["A", "B", "C"]
}
let resource = await store.getData('./path.to.jsonld');
let somefield = await resource.get('somefield');

Actual behaviour:
somefield == null

Expected behaviour:
somefield == ["A", "B", "C"]

The i18n logic may need a more robust approach to handle other type of arrays, like nested ones for instance, still the way I implemented it should preserve the current behaviour for i18n and the OFN case.

Merge request reports