openstreetmap-geojson
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "openstreetmap-geojson", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Get GeoJSON from OpenStreetMaps", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -15,4 +15,4 @@ const fetch = require('node-fetch') | ||
const text = await res.text() | ||
if (!res || res.status !== 200 || text === 'None\n') throw new Error('Unable to fetch the GeoJSON') | ||
if (!res || res.status !== 200) throw new Error('Unable to fetch the GeoJSON') | ||
if (text === 'None\n') return {} | ||
const json = JSON.parse(text) | ||
@@ -19,0 +19,0 @@ return json |
4471
73