dynamic structure switch

This commit is contained in:
Jan Prochazka
2023-02-19 19:23:51 +01:00
parent eb098bb33a
commit 29eef5619d
4 changed files with 27 additions and 7 deletions

View File

@@ -12,7 +12,9 @@ class StringifyStream extends stream.Transform {
_transform(chunk, encoding, done) {
let skip = false;
if (!this.wasHeader) {
skip = (chunk.__isStreamHeader && !this.header) || (chunk.__isStreamHeader && chunk.__isDynamicStructure);
skip =
(chunk.__isStreamHeader && !this.header) ||
(chunk.__isStreamHeader && chunk.__isDynamicStructure && !chunk.__keepDynamicStreamHeader);
this.wasHeader = true;
}
if (!skip) {