mirror of https://codeberg.org/pzp/pzp-db.git
tiny refactor in Ghosts
This commit is contained in:
parent
6661b73fd4
commit
cf1532965e
|
@ -52,7 +52,7 @@ class Ghosts {
|
|||
// neither fully parallel
|
||||
if (FS.existsSync(basePath)) {
|
||||
const done = multicb({ pluck: 1 })
|
||||
FS.readdirSync(basePath).forEach((tangleID) => {
|
||||
for (const tangleID of FS.readdirSync(basePath)) {
|
||||
const cb = done()
|
||||
this.#read(tangleID, (err, map) => {
|
||||
// prettier-ignore
|
||||
|
@ -60,7 +60,7 @@ class Ghosts {
|
|||
this.#maps.set(tangleID, map)
|
||||
cb()
|
||||
})
|
||||
})
|
||||
}
|
||||
done((err, _) => {
|
||||
// prettier-ignore
|
||||
if (err) throw new Error('GhostDB failed to load', { cause: err })
|
||||
|
|
Loading…
Reference in New Issue