mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-18 13:44:12 +00:00
excel import leading and trailing whitespace (#902)
* add test for leading and trailing whitespace * trim whitespace
This commit is contained in:
committed by
GitHub
parent
c4136a0ec7
commit
b14ac07568
@@ -74,7 +74,7 @@ export const parseExcel = (excelData: unknown[][], options?: Partial<ImportMap>)
|
||||
|
||||
for (const [key, value] of Object.entries(importMap)) {
|
||||
if (typeof value === 'string') {
|
||||
importMap[key] = value.toLocaleLowerCase();
|
||||
importMap[key] = value.toLocaleLowerCase().trim();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ export const parseExcel = (excelData: unknown[][], options?: Partial<ImportMap>)
|
||||
if (column.length === 0) {
|
||||
continue;
|
||||
}
|
||||
const columnText = column.toLowerCase();
|
||||
const columnText = column.toLowerCase().trim();
|
||||
|
||||
// check if it is an ontime column
|
||||
if (handlers[columnText]) {
|
||||
|
||||
Reference in New Issue
Block a user