Skip to content

Adding models when instantiating store crashes #6

@SpaceK33z

Description

@SpaceK33z

Using this (assuming you have a store with a model):

new Store([{ id: 1 }]);

Will give:

TypeError: this.Model is not a constructor

This is because the constructor() in src/Store.js is executed before the child constructor can set this.Model. I have no idea yet how to fix this unfortunately.

There is a failing testcase (currently skipped) in src/__tests__/Store.js

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