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

[lit-next] Ensure nested directives handle noChange as expected #1519

Closed
sorvell opened this issue Jan 6, 2021 · 1 comment
Closed

[lit-next] Ensure nested directives handle noChange as expected #1519

sorvell opened this issue Jan 6, 2021 · 1 comment
Assignees

Comments

@sorvell
Copy link
Member

sorvell commented Jan 6, 2021

When a directive returns noChange any nested directive value it might otherwise return should be unchanged. Currently, the resolveDirective helper does not handle noChange and treats this as a value that should clear the nested directive. The nested directive gets removed and then re-created if it is subsequently returned. This prevents, for example, the guard directive from being able to guard a nested directive from running.

To address this, resolveDirective can special case noChange to bail early and simply not process any nested directives.

@sorvell
Copy link
Member Author

sorvell commented Jan 11, 2021

Fixed via #1520.

@sorvell sorvell closed this as completed Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant