Skip to content

Commit

Permalink
geosolutions-it#4647: upgrade json2csv to remove 1 critical vulnerabi…
Browse files Browse the repository at this point in the history
…lity

On Behalf of DB Systel
  • Loading branch information
Florian Kellner committed Apr 30, 2024
1 parent eeded8c commit e55b1d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web/client/epics/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import { LOCATION_CHANGE } from 'connected-react-router';
import { saveAs } from 'file-saver';
import {downloadCanvasDataURL} from '../utils/FileUtils';
import {reprojectBbox} from '../utils/CoordinatesUtils';
import converter from 'json-2-csv';
import {json2csv} from 'json-2-csv';
import { defaultGetZoomForExtent } from '../utils/MapUtils';
import { updateDependenciesMapOfMapList, DEFAULT_MAP_SETTINGS } from "../utils/WidgetsUtils";

Expand Down Expand Up @@ -133,9 +133,9 @@ const configureDependency = (active, dependency, options) =>
export const exportWidgetData = action$ =>
action$.ofType(EXPORT_CSV)
.do( ({data = [], title = "data"}) =>
converter.json2csv(data, (err, csv) => err ? null : saveAs(new Blob([
csv
], {type: "text/csv"}), title + ".csv")))
saveAs(new Blob([
json2csv(data)
], {type: "text/csv"}), title + ".csv"))
.filter( () => false);
/**
* Intercepts changes to widgets to catch widgets that can share some dependencies.
Expand Down

0 comments on commit e55b1d1

Please sign in to comment.