Skip to content

Commit

Permalink
Fixes pinojs#1167 (dedupe should write to all streams matching the ta…
Browse files Browse the repository at this point in the history
…rget level)
  • Loading branch information
Zsombor Franczia committed Oct 18, 2021
1 parent 0baccea commit c961d9c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/multistream.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,13 @@ function multistream (streamsArray, opts) {
stream.lastObj = lastObj
stream.lastLogger = lastLogger
}
if (!opts.dedupe) {
if (!opts.dedupe || dest.level === level) {
stream.write(data)
}
} else {
break
}
}

if (opts.dedupe && stream) {
stream.write(data)
}
}

function flushSync () {
Expand Down

0 comments on commit c961d9c

Please sign in to comment.