Skip to content

[BUGFIX] Add assertion for invalid component helper argument#21406

Open
olenderhub wants to merge 1 commit into
emberjs:mainfrom
olenderhub:bugfix-component-helper-strict-mode-assertion
Open

[BUGFIX] Add assertion for invalid component helper argument#21406
olenderhub wants to merge 1 commit into
emberjs:mainfrom
olenderhub:bugfix-component-helper-strict-mode-assertion

Conversation

@olenderhub
Copy link
Copy Markdown
Contributor

Fixes #18072

Adds a debug assertion in the dynamic component resolution opcode to throw a useful error when the {{component}} helper receives an invalid argument type, e.g. an object, instead of failing with a cryptic error.

Adds a test to verify the assertion fires with the expected message.

Tested with:

  • pnpm test:wip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unreachable code "reached" when trying to render a non-string with the component helper

1 participant