Explorar o código

fix(devtools): unmountApp not behind compile flag

Guillaume Chau %!s(int64=5) %!d(string=hai) anos
pai
achega
6eb7fd8333
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      packages/runtime-core/src/apiCreateApp.ts

+ 3 - 1
packages/runtime-core/src/apiCreateApp.ts

@@ -251,7 +251,9 @@ export function createAppAPI<HostElement>(
       unmount() {
         if (isMounted) {
           render(null, app._container)
-          devtoolsUnmountApp(app)
+          if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
+            devtoolsUnmountApp(app)
+          }
         } else if (__DEV__) {
           warn(`Cannot unmount an app that is not mounted.`)
         }