Skip to content

Commit

Permalink
If the data returned by getItemData is empty, this function should re…
Browse files Browse the repository at this point in the history
…turn null

#504
  • Loading branch information
pfcstyle committed Mar 26, 2020
1 parent 48887a0 commit 05627f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/arcgis-rest-portal/src/items/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function getItemData(
/* if the item doesn't include data, the response will be empty
and the internal call to response.json() will fail */
const emptyResponseErr = RegExp(
/Unexpected end of (JSON input|data at line 1 column 1)/i
/The string did not match the expected pattern|(Unexpected end of (JSON input|data at line 1 column 1))/i
);
/* istanbul ignore else */
if (emptyResponseErr.test(err.message)) {
Expand Down

0 comments on commit 05627f8

Please sign in to comment.