Skip to content

Conversation

edison1105
Copy link
Member

@edison1105 edison1105 commented Feb 2, 2023

fix #7576

chore: improve code

chore: improve code

chore: improve code

chore: improve code
@LinusBorg LinusBorg added scope: reactivity 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. labels Feb 14, 2023
@skirtles-code
Copy link
Contributor

I don't think it should matter whether the new job is pre: true or not, the insertion point should be the same either way. I think we only need to check the pre flag on jobs that are already in the queue.

I believe this change would introduce a regression. The middle-- part seems unnecessary, and can lead to the insertion point being before the flushIndex:

SFC Playground - regression

Notice how the component doesn't re-render when the button is clicked, because the rendering job is inserted too early in the queue.

Here's that same example with the current main:

SFC Playground - working

I've opened a separate PR, #7748, where I've proposed an alternative fix for the original problem.

@edison1105
Copy link
Member Author

@skirtles-code
Thank you for the review and your point is correct.
Close this one.

@edison1105 edison1105 closed this Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. scope: reactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Watchers no longer fire in the order they're defined from v3.2.38
3 participants