Skip to content

_injectRelations failing when being called with an array of resources during findAll #188

Closed
@pietschy

Description

@pietschy

The following is failing when the injected item is an array (i.e. during a call to findAll).

// about line 5443
// the following is failing as injected can be an array.
if (definition.relations) {
    _injectRelations.call(DS, definition, injected);
}

I got it working by moving it to the _inject function where it handles singular items.

// about line 5337
resource.index.put(id, item);
// inserted here.
if (definition.relations) {
   _injectRelations.call(DS, definition, item);
}
_react.call(item, {}, {}, {});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions