Skip to content

Commit

Permalink
Fix #1357 map: broken when used without config object
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Jul 8, 2024
1 parent 84c43d6 commit 7087488
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion build/select-packages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ prompt([
{ value: 'core', checked: true },
...packages,
],
pageSize: 100,
}
])
.then((answers) => {
Expand Down
4 changes: 0 additions & 4 deletions packages/core/src/utils/psv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,6 @@ export function getConfigParser<T extends Record<string, any>, U extends T = T>(
parsers?: ConfigParsers<T, U>
): ConfigParser<T, U> {
const parser = function (userConfig: T): U {
if (!userConfig) {
return clone(defaults);
}

const rawConfig: U = clone({
...defaults,
...userConfig,
Expand Down
2 changes: 1 addition & 1 deletion packages/map-plugin/src/MapPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const getConfig = utils.getConfigParser<MapPluginConfig, ParsedMapPluginConfig>(
return utils.cleanCssPosition(position, { allowCenter: false, cssOrder: true }) || defValue;
},
rotation: (rotation) => utils.parseAngle(rotation),
coneColor: (coneColor) => (coneColor ? new Color(coneColor).getStyle() : null),
coneColor: (coneColor) => (coneColor ? new Color(coneColor).getStyle() : null), // must be in rgb format
defaultZoom: (defaultZoom) => Math.log(defaultZoom / 100),
maxZoom: (maxZoom) => Math.log(maxZoom / 100),
minZoom: (minZoom) => Math.log(minZoom / 100),
Expand Down

0 comments on commit 7087488

Please sign in to comment.