Просмотр исходного кода

fix(devtools): unmountApp not behind compile flag

Guillaume Chau 5 лет назад
Родитель
Сommit
6eb7fd8333
1 измененных файлов с 3 добавлено и 1 удалено
  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.`)
         }