Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'replace' of undefined #35

Open
johnwp opened this issue Sep 14, 2016 · 1 comment
Open

Cannot read property 'replace' of undefined #35

johnwp opened this issue Sep 14, 2016 · 1 comment

Comments

@johnwp
Copy link

johnwp commented Sep 14, 2016

I'm getting the following error:

/app/node_modules/comma-separated-values/csv.js:50
    return string.replace(/"/g,'\\"');
                 ^
TypeError: Cannot read property 'replace' of undefined
    at sanitizeString (/app/node_modules/comma-separated-values/csv.js:50:18)

When executing the following code. Everything works fine without the configuration object.

new CSV(fileData, {
    header: [
        'monthNum',
        'projectedLossRateAtMonth',
        'actualLossRateAtMonth',
        'adjustedProjectedLossRate',
        'stressedLossRate',
        'breakEvenLossRate',
        'pim',
        'rating'
    ]
}).parse();
@CyrusNuevoDia
Copy link
Owner

Could you give me a sample of some of the fileData's contents?
Also, what version of CSV.js are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants