Skip to content

Commit

Permalink
Removes un-necessary console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstandiford committed Aug 17, 2021
1 parent f3ab0e4 commit 1c28ba5
Show file tree
Hide file tree
Showing 3 changed files with 244 additions and 58 deletions.
8 changes: 0 additions & 8 deletions app/middlewares/setup/setPreloadWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,43 +14,35 @@ function getUrls() {

// Bail if the URL does not have an href
if ( url.href === undefined ) {
console.debug( 'url does not have an href, skipping' )
return acc
}

url = new Url( url.href )

// If local, bail
if ( !url.isLocal() ) {
console.debug( 'url is not local, skipping' )
return acc
}

// If admin, bail
if ( url.pathname.includes( 'wp-admin' ) || url.pathname.includes( 'wp-login' ) ) {
console.debug( 'url is admin, skipping' )
return acc
}

// If cached, bail
if ( url.getCache() ) {
console.debug( 'url is already cached, skipping' )
return acc
}

// If the URL is already in the queue, bail
if ( acc.find( accUrl => accUrl.matchesUrl( url ) ) ) {
console.log( acc, url )
console.debug( 'url duplicate, skipping' )
return acc
}

acc.push( url )

return acc
}, [] )

console.log( queue )
}

/**
Expand Down
292 changes: 243 additions & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nicholas-wp",
"version": "1.0.4",
"version": "1.0.5",
"description": "WordPress support for Nicholas nearly headless theme framework",
"main": "fetch.js",
"scripts": {
Expand Down

0 comments on commit 1c28ba5

Please sign in to comment.