Skip to content
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

$forceUpdate causes getCurrentScope to get an incorrect value #13134

Closed
1593292349 opened this issue Dec 15, 2023 · 2 comments
Closed

$forceUpdate causes getCurrentScope to get an incorrect value #13134

1593292349 opened this issue Dec 15, 2023 · 2 comments

Comments

@1593292349
Copy link

Version

2.7.16-beta.2

Reproduction link

github.com

Steps to reproduce

1.npm install
2.npm run start
3.Execute the "getCurrentScope "method on the console, Get the correct value
4.Click the render button
5.Execute the "getCurrentScope "method on the console, Get the wrong value

What is expected?

The getCurrentScope method always returns undefined

What is actually happening?

The getCurrentScope method returns not undefined after calling the $forceUpdate method

@HawtinZeng
Copy link

image
The screen shot shows the return value of getCurrentScope, it may be the effect scope of current component?(App.vue component in your offered codebase), by the way, your new vue instance(vm) have not be mounted into the DOM(.$mount() haven't offer position reference to mount).

@HawtinZeng
Copy link

HawtinZeng commented Dec 17, 2023

I found some new details,
image
when I place console.log(getCurrentScope()); at #1, the result including effects property, whose value is an array, have a item whose $el property is <div id='app'....> dom node, and when palced console.log(getCurrentScope()); at #2, in the same place, whose $el property is div node in vm component...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants