diff --git a/package.json b/package.json index f95d3d5..a6e6e0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@watergis/geojson2inp", - "version": "0.1.3", + "version": "0.1.4", "description": "This module converts GeoJSON to EPANET INP file", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/inp/InpCurves.ts b/src/inp/InpCurves.ts index 3a783d1..62f33bc 100644 --- a/src/inp/InpCurves.ts +++ b/src/inp/InpCurves.ts @@ -20,8 +20,8 @@ export default class InpPumps extends InpBase { if (!data)return; const contents = [ pad(data.id, 16), - pad(data.flow.toString(), 12), - pad(data.head.toString(), 12) + pad(data.flow?data.flow.toString():'', 12), + pad(data.head?data.head.toString():'', 12) ]; this.addText(` ${contents.join('\t')}\t;\n`); }