Approvals.NodeJS icon indicating copy to clipboard operation
Approvals.NodeJS copied to clipboard

Fix bug "Cannot read property 'blockUntilReporterExits' of undefined"

Open DanKaplanSES opened this issue 4 years ago • 0 comments

Description

Perhaps I misunderstanding something in the readme, because I feel like most should be running into this (it's a bug on the latest release): when the options in lib/FileApprover.js are undefined, you get an error trying to boot up the reporter:

Error raised by reporter [Meld]: TypeError: Cannot read property 'blockUntilReporterExits' of undefined

I received the same error with the Visual Studio code reporter.

I do think this change should be there, because earlier in the file it checks if options is undefined.

The solution

I pass an empty object if options is undefined. Normally I would write a failing test for this, but I am at work at the moment. I can add that later.

DanKaplanSES avatar Sep 21 '21 19:09 DanKaplanSES