diia-open-source / be-pkg-utils

European Union Public License 1.2
14 stars 10 forks source link

added missing optional chaining in pdf utils #34

Closed yrambler2001 closed 2 days ago

EpanchinE commented 3 months ago

If you overuse optional chaining, you will silence errors and make it much more difficult to debug your code later. Overuse optional chainig increases amount of conditional branches in code which should be covered by unit tests.

FowiFlowi commented 2 days ago

@yrambler2001, thank you for PR! We considered your changes when migrating mapping directly to the documents service. Example: https://github.com/diia-open-source/be-documents-service/blob/main/src/documents/driverLicense/dataMappers/documentPdf.ts