Skip to content

exception when trying to access a value of "null" #9

@thorstenKoch

Description

@thorstenKoch

Error Case:

In a cell i have a value, which is null. This will break the download() with the following error:

Subscriber.js:242 Uncaught TypeError: Cannot read property 'indexOf' of null at Ng2CsvService.webpackJsonp.1016.Ng2CsvService.escapeRowValue (Ng2Csv.service.js:51) at Ng2Csv.service.js:42 at Array.map (<anonymous>) at Ng2CsvService.webpackJsonp.1016.Ng2CsvService.convertToCsv (Ng2Csv.service.js:42) at Ng2CsvService.webpackJsonp.1016.Ng2CsvService.download (Ng2Csv.service.js:18) at BatchComponent.webpackJsonp.1146.BatchComponent.startDownload (batch.component.ts:169) at BatchComponent.webpackJsonp.1146.BatchComponent.downloadSelected (batch.component.ts:138) at Object.eval [as handleEvent] (BatchComponent.html:113) at handleEvent (core.es5.js:11998) at callWithDebugContext (core.es5.js:13467)

Expected Behaviour:

I would expect that null values will be like an empty string in a cell, displays nothing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions