@eturnity/eturnity_maths 9.10.0 → 9.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_maths",
3
- "version": "9.10.0",
3
+ "version": "9.13.0",
4
4
  "author": "Eturnity Team",
5
5
  "main": "src/index.js",
6
6
  "private": false,
@@ -383,7 +383,9 @@ export class Polygon {
383
383
  extraSerialization.data = {
384
384
  ...this.data,
385
385
  }
386
- extraSerialization.roof = { id: this.roof.id }
386
+ if (this.roof) {
387
+ extraSerialization.roof = { id: this.roof.id }
388
+ }
387
389
  extraSerialization.pvData = this.pvData ? { ...this.pvData } : null
388
390
  extraSerialization.mountingData = this.mountingData
389
391
  ? { ...this.mountingData }
@@ -444,7 +446,7 @@ export class Polygon {
444
446
  }
445
447
  return {
446
448
  module_field_uuid: this.id,
447
- roof_uuid: this.roof.id,
449
+ roof_uuid: this.roof ? this.roof.id : null,
448
450
  version: this.version,
449
451
  module_field_outline: this.outline.map((v) => [v.x, v.y, v.z]),
450
452
  col_spacing_mm: this.data.col_spacing_mm,