Skip to content

Commit

Permalink
refactor(sync): rename wordpress redirect map fn
Browse files Browse the repository at this point in the history
  • Loading branch information
mlbrgl committed Feb 18, 2024
1 parent 2f43949 commit 2785a24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions baker/syncRedirectsToGrapher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Redirect, Url } from "@ourworldindata/utils"

// A close cousing of the getWordpressRedirectsMap() function from
// redirects.ts.
const getWordpressRedirectsMap = (
const getWordpressRedirectsMapFromRedirects = (
redirects: Redirect[]
): Map<string, string> => {
return new Map(redirects.map((r) => [r.source, r.target]))
Expand Down Expand Up @@ -37,7 +37,7 @@ export const syncRedirectsToGrapher = async (): Promise<void> => {
// Wordpress redirects until we reach a final target
const resolvedUrl = await resolveRedirectFromMap(
Url.fromURL(source),
getWordpressRedirectsMap(allWordpressRedirects)
getWordpressRedirectsMapFromRedirects(allWordpressRedirects)
)

// Use the no-trailing slash version of the resolved target URL.
Expand Down

0 comments on commit 2785a24

Please sign in to comment.