diff options
Diffstat (limited to 'gui/scripts')
| -rw-r--r-- | gui/scripts/prepare-rtree.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gui/scripts/prepare-rtree.ts b/gui/scripts/prepare-rtree.ts index f18f772aa0..27fabb2f13 100644 --- a/gui/scripts/prepare-rtree.ts +++ b/gui/scripts/prepare-rtree.ts @@ -23,16 +23,17 @@ function main() { try { processGeometry(source, destination); - } catch (error) { + } catch (e) { + const error = e as Error; console.error(`Failed to process ${name}: ${error.message}`); } } } function processGeometry(source: string, destination: string) { - const collection = JSON.parse(fs.readFileSync(source, { encoding: 'utf8' })) as Topology< - GeometryTopologyObjects - >; + const collection = JSON.parse( + fs.readFileSync(source, { encoding: 'utf8' }), + ) as Topology<GeometryTopologyObjects>; const { geometry } = collection.objects; const treeData = geometry.geometries.map((object, i) => { |
