Skip to content

fix: do not check config too early#18

Merged
sebastianthulin merged 1 commit intomainfrom
fix/do-not-check-config-before-hooks
Jan 24, 2025
Merged

fix: do not check config too early#18
sebastianthulin merged 1 commit intomainfrom
fix/do-not-check-config-before-hooks

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