Skip to content

Commit

Permalink
🐛 (explorer) remove mapTargetTime=0 from grapher config
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann committed Oct 31, 2024
1 parent 45a5077 commit e07f64a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions explorer/ExplorerProgram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
trimObject,
mergeGrapherConfigs,

Check warning on line 21 in explorer/ExplorerProgram.ts

View workflow job for this annotation

GitHub Actions / eslint

'mergeGrapherConfigs' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 21 in explorer/ExplorerProgram.ts

View workflow job for this annotation

GitHub Actions / eslint

'mergeGrapherConfigs' is defined but never used. Allowed unused vars must match /^_/u
merge,
isEmpty,
} from "@ourworldindata/utils"
import {
CellDef,
Expand Down Expand Up @@ -409,6 +410,12 @@ export class ExplorerProgram extends GridProgram {
]
}

// TODO: remove after mapTargetTime=0 has been removed from configs
if (mergedConfig.map.time === 0) {
delete mergedConfig.map.time
if (isEmpty(mergedConfig.map)) delete mergedConfig.map
}

return mergedConfig
}

Expand Down

0 comments on commit e07f64a

Please sign in to comment.