File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -345,7 +345,7 @@ export class GoogleSpreadsheetWorksheet {
345
345
if ( ! rows ) {
346
346
throw new Error ( 'No values in the header row - fill the first row with header values before trying to interact with rows' ) ;
347
347
}
348
- this . _headerValues = _ . map ( rows [ 0 ] , ( header ) => header . trim ( ) ) ;
348
+ this . _headerValues = _ . map ( rows [ 0 ] , ( header ) => header ? .trim ( ) ) ;
349
349
if ( ! _ . compact ( this . headerValues ) . length ) {
350
350
throw new Error ( 'All your header cells are blank - fill the first row with header values before trying to interact with rows' ) ;
351
351
}
@@ -357,7 +357,7 @@ export class GoogleSpreadsheetWorksheet {
357
357
if ( headerValues . length > this . columnCount ) {
358
358
throw new Error ( `Sheet is not large enough to fit ${ headerValues . length } columns. Resize the sheet first.` ) ;
359
359
}
360
- const trimmedHeaderValues = _ . map ( headerValues , ( h ) => h . trim ( ) ) ;
360
+ const trimmedHeaderValues = _ . map ( headerValues , ( h ) => h ? .trim ( ) ) ;
361
361
checkForDuplicateHeaders ( trimmedHeaderValues ) ;
362
362
363
363
if ( ! _ . compact ( trimmedHeaderValues ) . length ) {
You can’t perform that action at this time.
0 commit comments