瀏覽代碼

fix(devtools): unmountApp not behind compile flag

Guillaume Chau 5 年之前
父節點
當前提交
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.`)
         }