Skip to content

Commit

Permalink
tweak injectEl
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Dec 18, 2020
1 parent 78f7365 commit a1e1f33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,9 @@ function wpEnqueueStyle( handle, src, deps, ver, media ) {
// Create the element.
var style = document.createElement( 'link' ),
isFirst = ! window.wpEnqueueStyleLastInjectedEl,
injectEl = isFirst ? document.head : document.getElementById( window.wpEnqueueStyleLastInjectedEl ),
injectEl = isFirst
? document.getElementById( 'wp-enqueue-style-script' )
: document.getElementById( window.wpEnqueueStyleLastInjectedEl ),
injectPos = isFirst ? 'afterbegin' : 'afterend';

// Add element props for the stylesheet.
Expand Down

0 comments on commit a1e1f33

Please sign in to comment.