Skip to content

_injectRelations failing when being invoked with array in 1.0.0 #202

Closed
@pietschy

Description

@pietschy

I've updated to 1.0.0 and now have an issue similar to #188. Now it's failing when the array has multiple items.

This plunker demonstrates the issue (it's a fork of the 188 issue plunker so I hope I haven't buggered it up.)
http://plnkr.co/edit/S0z9v3ubnrzY53xh9nSJ?p=preview
Patching at line 5443 to the following seems to fix it:

if (definition.relations) {
    // evil hacky if/elsey fix.   
    if (Array.isArray(injected)) {
      for (var i = 0; i < injected.length; i++) {
        _injectRelations.call(DS, definition, injected[i]);  
      } 
    } else {
      // was just calling this.
      _injectRelations.call(DS, definition, injected);  
    }
  }

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