Skip to content

Commit ed9ea6f

Browse files
MelvinBotsuneox
andcommitted
Fix: replace Str.removeSpaces with replaceAll to handle all spaces in CSV headers
Co-authored-by: suneox <11959869+suneox@users.noreply.github.com> Co-authored-by: Cong Pham <suneox@users.noreply.github.com>
1 parent 5be506e commit ed9ea6f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/components/ImportColumn.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import {Str} from 'expensify-common';
21
import React, {useEffect, useRef} from 'react';
32
import {View} from 'react-native';
43
import useLocalize from '@hooks/useLocalize';
@@ -14,7 +13,7 @@ import Text from './Text';
1413
// cspell:disable
1514
function findColumnName(header: string, columnRoles?: ColumnRole[]): string {
1615
let attribute = '';
17-
const formattedHeader = Str.removeSpaces(String(header).toLowerCase().trim());
16+
const formattedHeader = String(header).toLowerCase().trim().replaceAll(' ', '');
1817
switch (formattedHeader) {
1918
case 'email':
2019
case 'emailaddress':

0 commit comments

Comments
 (0)