fix(runtime-core): ensure app instance can be garbage collected after unmount (close #2907) (#2909)

close #2907

Co-authored-by: Thorsten Luenborg <t.luneborg@googlemail.com>
This commit is contained in:
Thorsten Lünborg 2021-02-03 19:09:20 +01:00 committed by GitHub
parent d5cce47789
commit 60e05eff23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -272,6 +272,7 @@ export function createAppAPI<HostElement>(
if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
devtoolsUnmountApp(app)
}
delete app._container.__vue_app__
} else if (__DEV__) {
warn(`Cannot unmount an app that is not mounted.`)
}