Skip to content

Be forgiving with include array #154

Description

@ryanto

Technically, includes should be a string.

store.loadAll('posts', { include: 'comments,author' });

However, I've come across times in the real world when it's passed an array.

store.loadAll('posts', { include: ['comments', 'author'] });

While this is incorrect, it's something we can correct. Currently, storefront will error with a hard to read stack trace from deep in library when it tries to use a string method on the array.

As a fix, if we come across an includes array we should correct it by running [].join(',')

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions