Parcourir la source

fix(devtools): unmountApp not behind compile flag

Guillaume Chau il y a 5 ans
Parent
commit
6eb7fd8333
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  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.`)
         }