Skip to content

Commit

Permalink
conditionally set geojson property planx_user_action
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Jan 24, 2024
1 parent 96ae0e8 commit ed5922b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api.planx.uk/modules/send/utils/exportZip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export async function buildSubmissionExportZip({
// add an optional GeoJSON file to zip
const geojson = passport?.data?.["property.boundary.site"];
if (geojson) {
geojson["properties"]["planx_user_action"] = userAction;
if (userAction) geojson["properties"]["planx_user_action"] = userAction;
const geoBuff = Buffer.from(JSON.stringify(geojson, null, 2));
zip.addFile({
name: "LocationPlanGeoJSON.geojson",
Expand Down

0 comments on commit ed5922b

Please sign in to comment.