mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-12-29 16:16:02 +00:00
Merge pull request #71 from iib0011/chesterkxng
fix: edge case (empty string in csv-rows-to-columns)
This commit is contained in:
@@ -17,6 +17,10 @@ export function csvRowsToColumns(
|
|||||||
customFiller: string,
|
customFiller: string,
|
||||||
commentCharacter: string
|
commentCharacter: string
|
||||||
): string {
|
): string {
|
||||||
|
if (!input) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
const rows = input
|
const rows = input
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.map((row) => row.split(','))
|
.map((row) => row.split(','))
|
||||||
|
|||||||
Reference in New Issue
Block a user