fix(glimmer): add assertion for invalid dynamic component argument#21405
Closed
olenderhub wants to merge 1 commit into
Closed
fix(glimmer): add assertion for invalid dynamic component argument#21405olenderhub wants to merge 1 commit into
olenderhub wants to merge 1 commit into
Conversation
3def458 to
c08a7c5
Compare
| this.render('{{component this.componentName}}', { | ||
| componentName: { name: 'not-a-component' }, | ||
| }); | ||
| }, /The `{{component}}` helper only accepts strings or components/); |
Contributor
There was a problem hiding this comment.
note that strings are not accepted in strict mode
Member
|
huh, not sure what happened here .. did you rebase too far and include my commit from #main to update the version? |
Contributor
Author
|
@kategengler I am also not sure what happened there - I wanted to push changes by force. I created another one PR with including @NullVoxPopuli suggestion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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