cli-table icon indicating copy to clipboard operation
cli-table copied to clipboard

.toString() throws error when new Table was instanciated with "head" prop as undefined.

Open latchy opened this issue 1 year ago • 0 comments

The interface for TableOptions suggests that is it is valid to pass the constructor options head property as undefined, as if it were not passed at all - standard JS/TS practice.

Unfortunately this causes the .toString() method to throw an error since it does not appear to be checking whether the head options property isn't undefined.

I think this should just require a quick gaurd to ensure this is handled correctly?

latchy avatar Oct 12 '23 16:10 latchy