Skip to content

Commit

Permalink
[Refactor] Results createStream: clean up _push handler
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jan 13, 2024
1 parent 19cfc8f commit 878a500
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/results.js
Expand Up @@ -113,7 +113,6 @@ Results.prototype.createStream = function (opts) {
if (opts.objectMode) {
output = through();
self.on('_push', function ontest(t, extra) {
if (!extra) { extra = {}; }
var id = testId++;
t.once('prerun', function () {
var row = {
Expand All @@ -123,7 +122,7 @@ Results.prototype.createStream = function (opts) {
skip: t._skip,
todo: t._todo
};
if (hasOwn(extra, 'parent')) {
if (extra && hasOwn(extra, 'parent')) {
row.parent = extra.parent;
}
output.queue(row);
Expand Down

0 comments on commit 878a500

Please sign in to comment.