Im-Beast / deno_tui

🦕 Deno module for creating Terminal User Interfaces
https://deno.land/x/tui
MIT License
266 stars 18 forks source link

bug: Empty (or short?) table headers causes crash #38

Closed tingham closed 8 months ago

tingham commented 9 months ago

When specifying a table with:

{
 ...
 "headers": [],
  "data": []
}

We get crashing issues when calculating the frame dimensions in the draw method.

Expected behavior What you expected to happen instead.

Probably good if it didn't / doesn't crash.

Reproduction Code to reproduce the behavior (optional).

I'll provide a PR when I have something that seems right that resolves the issue.