Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Troubleshooting improvements for components and errors #642

Merged
merged 2 commits into from
Jun 27, 2024

Conversation

ericyhwang
Copy link
Contributor

Run-time troubleshooting improvements

  • In development, warn if a component's init() is improperly an async or Promise-returning function
  • Eagerly throw error if registering a singleton component that extends Component, instead of at render-time throwing an obscure "Uncaught TypeError: Cannot read properties of undefined (reading 'controller')"

New doc sections in Troubleshooting guide for errors

  • Error when using local model paths in singleton components
  • "Mutation on uncreated remote document"
  • "Invalid op submitted. Operation invalid in projected collection"

Tests

  • New tests for singleton components

- In development, warn if a component's init() is improperly an async or Promise-returning function
- Eagerly throw error if registering a singleton component that extends Component, instead of at render-time throwing an obscure "Uncaught TypeError: Cannot read properties of undefined (reading 'controller')"
- Add troubleshooting section for error when using local model paths in singleton components
- Add tests for singleton components
… document" and "Operation invalid in projected collection"
Copy link
Contributor

@craigbeck craigbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@ericyhwang ericyhwang merged commit 2ea48ec into master Jun 27, 2024
5 checks passed
@ericyhwang ericyhwang deleted the troubleshooting-component-updates branch June 27, 2024 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants