Skip to content

Commit 8831b1f

Browse files
committed
Remove single-use constant aliases
1 parent d49ce88 commit 8831b1f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

plugins/optimization-detective/detect-loader.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,12 @@
1010
*/
1111
// eslint-disable-next-line no-unused-vars
1212
async function load( detectSrc, detectArgs ) {
13-
const doc = document;
14-
const win = window;
15-
1613
// Wait until the resources on the page have fully loaded.
1714
await new Promise( ( resolve ) => {
18-
if ( doc.readyState === 'complete' ) {
15+
if ( document.readyState === 'complete' ) {
1916
resolve();
2017
} else {
21-
win.addEventListener( 'load', resolve, { once: true } );
18+
window.addEventListener( 'load', resolve, { once: true } );
2219
}
2320
} );
2421

0 commit comments

Comments
 (0)