osm-p2p-server
Advanced tools
Comparing version 1.10.9 to 1.10.10
@@ -12,6 +12,6 @@ // work-around for bug elsewhere where ways and relations | ||
var nrefs = [] | ||
;(row.refs || []).forEach(function (ref) { | ||
;(row.refs || []).forEach(function (ref, i) { | ||
pending++ | ||
osm.get(ref, function (err, docs) { | ||
if (Object.keys(docs).length > 0) nrefs.push(ref) | ||
if (Object.keys(docs).length > 0) nrefs[i] = ref | ||
//else console.log('SKIP', ref) | ||
@@ -22,6 +22,6 @@ if (--pending === 0) done() | ||
var nmembers = [] | ||
;(row.members || []).forEach(function (m) { | ||
;(row.members || []).forEach(function (m, i) { | ||
pending++ | ||
osm.get(m.ref, function (err, doc) { | ||
if (Object.keys(doc).length > 0) nmembers.push(m) | ||
if (Object.keys(doc).length > 0) nmembers[i] = m | ||
//else console.log('SKIP', m.ref) | ||
@@ -34,3 +34,4 @@ if (--pending === 0) done() | ||
function done () { | ||
if (row.refs) row.refs = nrefs | ||
if (row.refs) row.refs = nrefs.filter(Boolean) | ||
if (row.members) row.members = nmembers.filter(Boolean) | ||
next(null, row) | ||
@@ -37,0 +38,0 @@ } |
{ | ||
"name": "osm-p2p-server", | ||
"version": "1.10.9", | ||
"version": "1.10.10", | ||
"description": "serve osm http endpoints over a p2p db", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82706
27
2584
21