-
-
Notifications
You must be signed in to change notification settings - Fork 225
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: account for different scopes during path evaluation #831
Conversation
return { shouldDeopt: true }; | ||
} | ||
|
||
let blockParent = binding.path.scope.getBlockParent().path; |
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.
this requires null check too.
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.
Block parent cannot be null, it returns Program path.
|
||
if (node.kind !== "var") { | ||
return; | ||
} |
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.
why is this changed? Let's stick to .isType( params )
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.
Checking for isVariableDeclaration inside variableDeclaration feels weird. So changed it.
Also it checks first for type and kind.
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.
isVariableDeclaration has kind
... So let's change it back.
ce2fef2
to
537fb23
Compare
537fb23
to
b6d9675
Compare
fix "if" condition is incorrectly omitted after minify #810
fix if statement wrongly removed when var declaration inside conditional block #574 properly