Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "fix(wordpress): ensure all file links are rewritten" (#32398) #32422

Merged
merged 1 commit into from
Jul 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
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