Skip to content

"Unhandled error during execution of render function" when decreasing an array size #10752

@Muntaner

Description

@Muntaner

Vue version

^3.4.21

Link to minimal reproduction

https://codesandbox.io/p/sandbox/fervent-water-v6qx3m

Steps to reproduce

  1. Render an array as a list of entries. Each entry of such array contains a numeric value.
  2. Each entry is rendered via two v-fors, using the entry numeric value and an upperbound (check code for details).
  3. When the entry numeric value is decreased and the list is re-rendered, two warnings followed by an error are raised by the application. One of the warnings suggests to report the issue.

To reproduce the issue in the provided CodeSandbox, try to decrease the value by using the "Select array size" form control (defaults to 15, has options for 10 and 5).

image

What is expected?

No warnings/errors are raised. List is rendered correctly.

What is actually happening?

Two warnings are reported by Vue (one of which recommends reporting the issue on GitHub), followed by an error.

System Info

Tested and reproduced in Chrome on both Windows 11 and Fedora Workstation (39) x64

Any additional comments?

The issue seems to be behaving differently by using CodeSandbox and Vue SFC Playground.

In Vue SFC Playground, the same code gives no warnings, but only raises the error - this is why I'm using CodeSandbox as minimal reproduction link. Instead, CodeSandbox reports all of the three issues (two warnings + one error), which is the same experience I'm getting in the local project on my PC.

I was thinking there may be a mistake related to array lengths - but as far as I've seen, array lengths are always > 0 in the sample provided code.

Vue SFC Playground link (same code as CodeSandbox): link

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions