-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
deconflict binding this variable #4949
deconflict binding this variable #4949
Conversation
@tanhauhau Can you take a look at the merge conflicts here please? Most of them are caused by me renaming |
5c91b30
to
4f9a567
Compare
@Conduitry conflicts resolved |
It might not matter after minification, but is there a reason in the compiled code that this is splitting |
@@ -133,6 +133,7 @@ export default class InlineComponentWrapper extends Wrapper { | |||
const { component } = renderer; | |||
|
|||
const name = this.var; | |||
block.add_variable(name); |
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.
yes, @Conduitry , I'm adding block.add_variable(name)
here so that the later on bind:this
will notice that this variable name has been used.
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 happens for elements as well:
this.add_variable(id); |
Build on top of https://github.com/sveltejs/svelte/pull/4861/commits, contain #4861 changes on
bind:this
.opposed to #4792, this MR tries to get unique name for bind:this variable, instead of inline component variable
note: aware of variable merging logic in #4759
Before submitting the PR, please make sure you do the following
npm run lint
!)Tests
npm test
oryarn test
)