@forwardslashns/fws-geo-location-api 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -230,7 +230,7 @@ class GeoLocationClient {
230
230
  // parallel prefix-bucket strategy in that case.
231
231
  try {
232
232
  const raw = await this.httpService.get(`${api_constants_js_1.GEONAMES_BASE_URL}${api_constants_js_1.GEONAMES_ENDPOINTS.POSTAL_CODE_SEARCH}`, { country: upper, maxRows: feature_constants_js_1.MAX_ROWS_LIMIT });
233
- if (raw.postalCodes.length < feature_constants_js_1.MAX_ROWS_LIMIT) {
233
+ if (raw.postalCodes.length > 0 && raw.postalCodes.length < feature_constants_js_1.MAX_ROWS_LIMIT) {
234
234
  // Got the complete set in a single request.
235
235
  const result = raw.postalCodes.map((pc) => (0, postal_code_mapper_js_1.mapPostalCode)(pc, countryName));
236
236
  result.sort((a, b) => a.postalCode.localeCompare(b.postalCode, undefined, { numeric: true }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forwardslashns/fws-geo-location-api",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "FWS company dedicated TypeScript wrapper around the GeoNames geolocation API. Provides countries, regions, cities, and postal codes with username rotation and restriction support.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",