Skip to content

Commit

Permalink
Revert "fix(wordpress): ensure all file links are rewritten" (#32398) (
Browse files Browse the repository at this point in the history
…#32422)

This reverts commit f970600.

(cherry picked from commit 9e96088)

Co-authored-by: Tyler Barnes <tyler@gatsbyjs.com>
  • Loading branch information
GatsbyJS Bot and TylerBarnes committed Jul 19, 2021
1 parent 3d5bf37 commit 43cddb3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 106 deletions.

This file was deleted.

Expand Up @@ -271,7 +271,7 @@ const processAndDedupeImageUrls = urls =>
}, urls)
)

export const fetchMediaItemsBySourceUrl = async ({
const fetchMediaItemsBySourceUrl = async ({
mediaItemUrls,
selectionSet,
builtFragments,
Expand Down Expand Up @@ -319,16 +319,10 @@ export const fetchMediaItemsBySourceUrl = async ({
// we pass this resolve function into the queue function so it can let us
// know when it's finished
let resolveFutureNodes
const allResolvedNodes = [...previouslyCachedMediaItemNodes]
let resolveCountTogo = mediaItemUrlsPages.length
const futureNodes = new Promise(resolve => {
// combine our resolved nodes we fetched with our cached nodes
resolveFutureNodes = (nodes = []) => {
allResolvedNodes.push(...nodes)
if (--resolveCountTogo === 0) {
resolve(allResolvedNodes)
}
}
resolveFutureNodes = (nodes = []) =>
// combine our resolved nodes we fetched with our cached nodes
resolve([...nodes, ...previouslyCachedMediaItemNodes])
})

// we have no media items to fetch,
Expand Down

0 comments on commit 43cddb3

Please sign in to comment.