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

remove unnecessary condition from assets-loading #3395

Closed

Conversation

aristath
Copy link
Member

@aristath aristath commented Oct 3, 2022

It appears that an extra condition was preventing multiple scripts from loading in blocks like the navigation block - where we need a separate script for the modal.

This patch removes an additional condition that is not necessary.
Whether a style or script gets enqueued should not be related to the block's render callback.

Trac ticket: https://core.trac.wordpress.org/ticket/56408


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@cbravobernal
Copy link
Contributor

Nice job!! Work as expected

@aristath
Copy link
Member Author

aristath commented Oct 3, 2022

Note: This was reported in WordPress/twentytwentythree#214, then WordPress/gutenberg#44638

@dream-encode
Copy link
Contributor

Merged into core in https://core.trac.wordpress.org/changeset/54367.

Copy link
Member

@mukeshpanchal27 mukeshpanchal27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @aristath. LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

4 participants