Explorar el Código

fix(runtime-core): stop tracking deps in setRef during unmount (#13210)

dopamine hace 1 año
padre
commit
016c472bd2
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      packages/runtime-core/src/renderer.ts

+ 2 - 0
packages/runtime-core/src/renderer.ts

@@ -2098,7 +2098,9 @@ function baseCreateRenderer(
 
     // unset ref
     if (ref != null) {
+      pauseTracking()
       setRef(ref, null, parentSuspense, vnode, true)
+      resetTracking()
     }
 
     // #6593 should clean memo cache when unmount