Skip to content

Commit

Permalink
Prioritize mdim view config schema over top level (#4106)
Browse files Browse the repository at this point in the history
  • Loading branch information
rakyi authored Nov 7, 2024
1 parent 775f1f9 commit 1dd1223
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions adminSiteServer/multiDim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,12 @@ export async function createMultiDimConfig(
let viewGrapherConfig = {}
if (view.config) {
viewGrapherConfig = grapherConfigSchema
? migrateGrapherConfigToLatestVersion({
...view.config,
$schema: grapherConfigSchema,
})
? { $schema: grapherConfigSchema, ...view.config }
: view.config
if ("$schema" in viewGrapherConfig) {
viewGrapherConfig =
migrateGrapherConfigToLatestVersion(viewGrapherConfig)
}
}
const patchGrapherConfig = mergeGrapherConfigs(
viewGrapherConfig,
Expand Down

0 comments on commit 1dd1223

Please sign in to comment.