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

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

Open
luisherranz opened this issue Nov 20, 2024 · 0 comments · May be fixed by #67798
Open

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

luisherranz opened this issue Nov 20, 2024 · 0 comments · May be fixed by #67798
Labels
[Packages] Interactivity /packages/interactivity [Type] Bug An existing feature does not function as intended

Comments

@luisherranz
Copy link
Member

luisherranz commented Nov 20, 2024

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">
@luisherranz luisherranz added [Packages] Interactivity /packages/interactivity [Type] Bug An existing feature does not function as intended labels Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Packages] Interactivity /packages/interactivity [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant