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
Fix "Cannot read properties of undefined" regression #15031
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/53126/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -951,8 +951,8 @@ class Printer { | |||
const comment = comments[i]; | |||
|
|||
if (hasLoc && "loc" in comment && !this._printedComments.has(comment)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe judge comment.loc != null
directly here?
What is a test that shows the crash? |
This should be the case when |
This is in the main branch, I can't push, merge it first? |
Thanks! We were seeing this in CI here if it helps: https://github.com/redwoodjs/redwood/actions/runs/3220457113/jobs/5267202329#step:12:81 |
Patch: 'end or start' of undefined