The current behavior will break after the string concat of string before that placeholder, but it do not update the lastPos. So, those string will be double counted.
The fix is moving the break before the string concat. So, it will not double count those string. As the new placeholder always placed the last, this movement will not affect the other test.
Fixes pinojs/pino#1054
When we face
undefined
andnull
.The current behavior will break after the string concat of
string before that placeholder
, but it do not update thelastPos
. So, those string will be double counted.The fix is moving the break before the string concat. So, it will not double count those string. As the new placeholder always placed the last, this movement will not affect the other test.