Skip to content

Commit

Permalink
Simplify buffer check
Browse files Browse the repository at this point in the history
Co-authored-by: Jon Surrell <sirreal@users.noreply.github.com>
  • Loading branch information
sgomes and sirreal authored Sep 17, 2024
1 parent 1cc9a75 commit 5983d19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/dependency-extraction-webpack-plugin/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ class DependencyExtractionWebpackPlugin {
// Prepare to look for magic comments, in order to decide whether
// `wp-polyfill` is needed.
const processContentsForMagicComments = ( content ) => {
if ( content.toString().includes( '/* wp:polyfill */' ) ) {
if ( content.includes( '/* wp:polyfill */' ) ) {
chunkStaticDeps.add( 'wp-polyfill' );
}
};
Expand Down

0 comments on commit 5983d19

Please sign in to comment.