Skip to content

iAPI: Don't error when data-wp-each gets undefined #67174

@luisherranz

Description

@luisherranz

Description

If data-wp-each gets a undefined it just throws.

Instead of that, it should subscribe to the property and treat it as an empty array until it not longer undefined.

Step-by-step reproduction instructions

Just use data-wp-each with a non-existing value:

<template data-wp-each="context.nonExistingValue">

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Packages] Interactivity/packages/interactivity[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions