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

fix: do not check config too early #18

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

sebastianthulin
Copy link
Member

This pull request introduces a new method shouldEnqueue to the AssetInterface and implements it across various classes. This change aims to provide a consistent way to determine if an asset should be enqueued based on certain conditions.

Interface Update:

  • Added shouldEnqueue method to the AssetInterface to standardize the enqueue check across different asset types.

Method Implementations:

  • Implemented shouldEnqueue method in ContextDetection to return the result of isContextCheckEnabled configuration.
  • Implemented shouldEnqueue method in EditorHighlight to always return true.
  • Implemented shouldEnqueue method in FrontendStyles to always return true.

Enqueue Logic Enhancement:

  • Updated the enqueue method in AssetRegistry to check isEnabled before proceeding with the enqueue process.

@sebastianthulin sebastianthulin merged commit d9ecfb8 into main Jan 24, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants