diff --git a/abstract-table.ts b/abstract-table.ts index 87dda0b..7e1d71c 100644 --- a/abstract-table.ts +++ b/abstract-table.ts @@ -139,7 +139,7 @@ export abstract class Table { /** * Creates a row, populated with data, for displaying in the table. - * @param data The data in the shape of `R`, with values populated. + * @param data The data in the shape of `TRow`, with values populated. * @return A HTMLTableRowElement that can then be set on a table. */ createPopulatedRow(data: TRow): HTMLTableRowElement { @@ -199,6 +199,7 @@ export abstract class Table { this.clearRows() if (data.length === 0) { this.setMessage("No data to show. Empty list provided.") + return } this.appendRows(data) } @@ -220,7 +221,7 @@ export abstract class Table { } /** - * Appends a message to the alread existing table message, if the message element is set. Works even if current message is empty (""). + * Appends a message to the already existing table message, if the message element is set. Works even if current message is empty (""). * @param message The message to append to the current message. */ appendMessage(message: string) { @@ -229,7 +230,7 @@ export abstract class Table { } /** - * Sets the message, overwriting what it was before. Id the message element is not set, it does nothing. + * Sets the message, overwriting what it was before. If the message element is not set, it does nothing. * @param message The message to set the message element to. */ setMessage(message: string) {