Skip to content

Improve error message when referencing unknown properties #19

Closed
@curran

Description

@curran

Currently, when a property is referenced but not defined, the following error occurs:

reactive-model-v0.8.0.min.js:1 Uncaught TypeError: Cannot read property 'id' of undefined

Tasks:

  • Create a failing test that reproduces the error.
  • Implement code that detects when this error will occur, and throw an error that says (e.g. for property "foo") The property "foo" was referenced as a dependency for a reactive function before it was defined. Please define each property before referencing them in reactive functions.
  • Check for this text in the unit test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions