Skip to content

Commit

Permalink
Modify variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
JorgeMartinezG committed May 17, 2021
1 parent d6c3797 commit 1d5057e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/server-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,15 @@ async function runFeatureInfoRequest(
layers: WMSLayerProps[],
): Promise<{ [name: string]: string }> {
// Transform to snake case.
const toSnakeWmsParams = Object.entries(wmsParams).reduce(
const wmsParamsInSnakeCase = Object.entries(wmsParams).reduce(
(obj, item) => ({
...obj,
[snakeCase(item[0])]: item[1],
}),
{},
);

const res = await fetch(formatUrl(`${url}/ows`, toSnakeWmsParams));
const res = await fetch(formatUrl(`${url}/ows`, wmsParamsInSnakeCase));
const resJson: GeoJSON.FeatureCollection = await res.json();

const parsedProps = resJson.features.map(feature => {
Expand Down

0 comments on commit 1d5057e

Please sign in to comment.