From 44de866281f7b1a13cce67409844560c9e1c0a67 Mon Sep 17 00:00:00 2001 From: lucasrodes Date: Thu, 25 Jul 2024 11:38:57 +0200 Subject: [PATCH] correct population historical path --- .../@ourworldindata/grapher/src/core/GrapherConstants.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@ourworldindata/grapher/src/core/GrapherConstants.ts b/packages/@ourworldindata/grapher/src/core/GrapherConstants.ts index 5b9fc2f1369..37e1f952f29 100644 --- a/packages/@ourworldindata/grapher/src/core/GrapherConstants.ts +++ b/packages/@ourworldindata/grapher/src/core/GrapherConstants.ts @@ -60,10 +60,10 @@ export const isContinentsVariableId = (id: string | number): boolean => // ETL paths are composed of channel/namespace/version/dataset/table#columnname // We want to identify the any version of these two columns (added whitespaces for readability): -// grapher / demography / ANY VERSION / population # population -// grapher / demography / ANY VERSION / population # population_historical +// grapher / demography / ANY VERSION / population / population # population +// grapher / demography / ANY VERSION / population / historical # population_historical const population_regex = - /^grapher\/demography\/[\d-]+\/population\/population#population(_historical)?$/ + /^grapher\/demography\/[\d-]+\/population\/(population#population|historical#population_historical)$/ export const isPopulationVariableETLPath = (path: string): boolean => { return population_regex.test(path)