Skip to content

each with an undefined element and key blows up #20786

Closed

Description

@boris-petrov

🐞 Describe the Bug

See the reproduction below.

🔬 Minimal Reproduction

{{#each (array undefined) key="anything"}}{{/each}}

😕 Actual Behavior

Exception:

Uncaught (in promise) Error: boundsList cannot be empty
    at debugAssert (ember.js:511:1)
    at LiveBlockList.finalize (ember.js:6350:1)
    at NewElementBuilder.popBlock (ember.js:6329:1)
    at VM.execute (ember.js:6711:1)
    at TryOpcode.handleException (ember.js:6669:1)
    at UpdatingVMFrame.handleException (ember.js:6687:1)
    at UpdatingVM.throw (ember.js:6668:1)
    at Assert.evaluate (ember.js:6358:1)
    at UpdatingVM._execute (ember.js:6668:1)
    at ember.js:6665:1
    at debug$1.runInTrackingTransaction (ember.js:1360:1)
    at UpdatingVM.execute (ember.js:6665:1)
    at RenderResultImpl.rerender (ember.js:6687:1)
    at ember.js:14367:1
    at RootState.render (ember.js:14363:1)
    at ember.js:14398:1
    at inTransaction (ember.js:6494:1)
    at Renderer._renderRoots (ember.js:14391:1)
    at Renderer._renderRootsTransaction (ember.js:14403:1)
    at Renderer._revalidate (ember.js:14405:1)
    at invoke (ember.js:3200:1)
    at Queue.flush (ember.js:3195:1)
    at DeferredActionQueues.flush (ember.js:3214:1)
    at Backburner._end (ember.js:3244:1)
    at Backburner._boundAutorunEnd (ember.js:3221:1)

🤔 Expected Behavior

No error.

🌍 Environment

  • Ember: 5.12.0
  • Ember-CLI: 5.12.0
  • Node.js/npm: v23.1.0
  • OS: Linux
  • Browser: N/A

Activity

  1. Mudavath-Giri-Naik commented on Nov 7, 2024

    @Mudavath-Giri-Naik

    Hello @boris-petrov, can i work on this , since this is my first contribution

  2. NullVoxPopuli commented on Dec 9, 2025

    @NullVoxPopuli
    SponsorContributor

    It turns out that if the test is done in ember, it does reproduce!!

    I can have a go at fixing this once the repo merge is done 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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