]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(hmr): invalidate cached props/emits options on hmr
authorEvan You <yyx990803@gmail.com>
Mon, 17 Apr 2023 10:05:17 +0000 (18:05 +0800)
committerEvan You <yyx990803@gmail.com>
Mon, 17 Apr 2023 10:05:17 +0000 (18:05 +0800)
packages/runtime-core/src/hmr.ts

index c5039f62b6f3d8e70c52423f9a3f38c784c26d02..fe8ca132bc8b2177ba58acce271e5dedefc65225 100644 (file)
@@ -123,6 +123,8 @@ function reload(id: string, newComp: HMRComponent) {
     }
 
     // 3. invalidate options resolution cache
+    instance.appContext.propsCache.delete(instance.type as any)
+    instance.appContext.emitsCache.delete(instance.type as any)
     instance.appContext.optionsCache.delete(instance.type as any)
 
     // 4. actually update