Skip to content

Commit e6376d4

Browse files
authored
Merge pull request #21 from pitchart/fix/string-termination
Fixes string termination for empty results
2 parents e7ddcc5 + 52e8a24 commit e6376d4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Reducer/Termination/ToString.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ public function init()
2323

2424
public function step($result, $current)
2525
{
26-
return $result.$this->glue.$current;
26+
if ((string) $result) {
27+
return $result.$this->glue.$current;
28+
}
29+
return $current;
2730
}
2831

2932
public function complete($result)

0 commit comments

Comments
 (0)