Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch triggers 'set' on proxy: trap returned falsish for property 'default' #8188

Closed
danielroe opened this issue Apr 28, 2023 · 0 comments
Closed

Comments

@danielroe
Copy link
Member

Vue version

3.3.0-beta.2

Link to minimal reproduction

https://stackblitz.com/edit/github-oh8bn2?file=src/App.vue

Steps to reproduce

To trigger the bug, modify/save the file to trigger HMR. This is also reproducible in other situations, such as when navigating or triggering rerender in more complex contexts.

<script setup>
import { h } from 'vue';

const CompA = {
  setup(props, context) {
    return () => context.slots.default?.();
  },
};
const CompB = {
  setup(props, context) {
    return () => h(CompA, context.attrs, context.slots);
  },
};
</script>

<template>
  <div>
    <CompB>
      <!-- modify file to trigger bug -->
      test
    </CompB>
  </div>
</template>

What is expected?

I expect this to work.

What is actually happening?

The following error is thrown:

TypeError: 'set' on proxy: trap returned falsish for property 'default'
    at assign (<anonymous>)
    at updateSlots (chunk-BR2FAMHR.js?v=3f9a97d3:5769:9)
    at updateComponentPreRender (chunk-BR2FAMHR.js?v=3f9a97d3:7221:5)
    at ReactiveEffect.componentUpdateFn [as fn] (chunk-BR2FAMHR.js?v=3f9a97d3:7141:11)
    at ReactiveEffect.run (chunk-BR2FAMHR.js?v=3f9a97d3:423:19)
    at instance.update (chunk-BR2FAMHR.js?v=3f9a97d3:7205:52)
    at updateComponent (chunk-BR2FAMHR.js?v=3f9a97d3:7032:18)
    at processComponent (chunk-BR2FAMHR.js?v=3f9a97d3:6967:7)
    at patch (chunk-BR2FAMHR.js?v=3f9a97d3:6429:11)
    at ReactiveEffect.componentUpdateFn [as fn] (chunk-BR2FAMHR.js?v=3f9a97d3:7164:9)
(

System Info

No response

Any additional comments?

This seems to be a similar issue: #5307.

Downstream PR: nuxt/nuxt#20478

@github-actions github-actions bot locked and limited conversation to collaborators Sep 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants