diff --git a/src/UiGridAutoFitColumnsService.ts b/src/UiGridAutoFitColumnsService.ts index 0531f3f..939b8cf 100644 --- a/src/UiGridAutoFitColumnsService.ts +++ b/src/UiGridAutoFitColumnsService.ts @@ -87,6 +87,9 @@ export class UiGridAutoFitColumnsService { } columnsProcessor(renderedColumnsToProcess?: Array, rows?: Array) { + if (!rows.length) { + return renderedColumnsToProcess; + } // TODO: respect existing colDef options // if (col.colDef.enableColumnAutoFitting === false) return;