Skip to content

Commit

Permalink
fix(arcgis-rest-request): fixes an issue in append custom params wher…
Browse files Browse the repository at this point in the history
…e valid params of value 0 were

AFFECTS PACKAGES:
@esri/arcgis-rest-request
  • Loading branch information
drspacemanphd committed Apr 7, 2022
1 parent 3c740fe commit 4a63dd7
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ export function appendCustomParams<T extends IRequestOptions>(

// merge all keys in customOptions into options.params
options.params = keys.reduce((value, key) => {
if (customOptions[key] || typeof customOptions[key] === "boolean") {
if (
customOptions[key] ||
typeof customOptions[key] === "boolean" ||
(typeof customOptions[key] === "number" && customOptions[key] as unknown === 0)
) {
value[key as any] = customOptions[key];
}
return value;
Expand Down

0 comments on commit 4a63dd7

Please sign in to comment.