]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(hmr): keep slots proxy mutable for hmr
authorEvan You <yyx990803@gmail.com>
Mon, 1 May 2023 04:21:10 +0000 (12:21 +0800)
committerEvan You <yyx990803@gmail.com>
Mon, 1 May 2023 04:21:10 +0000 (12:21 +0800)
close #8188

packages/runtime-core/src/component.ts

index 087e901354b9951b8a1204fc450ec90f135ad274..684f028fd5bb42d7cd430e49550d9f9064f6b928 100644 (file)
@@ -971,14 +971,6 @@ function getSlotsProxy(instance: ComponentInternalInstance): Slots {
       get(target, key: string) {
         track(instance, TrackOpTypes.GET, '$slots')
         return target[key]
-      },
-      set() {
-        warn(`setupContext.slots is readonly.`)
-        return false
-      },
-      deleteProperty() {
-        warn(`setupContext.slots is readonly.`)
-        return false
       }
     }))
   )