mb21 / panwriter

Markdown editor with pandoc integration and paginated preview.
https://PanWriter.com
GNU General Public License v3.0
1.03k stars 49 forks source link

Fix export pdf error, empty external yaml #25

Closed jan-zajic closed 4 years ago

jan-zajic commented 4 years ago

Hi, we battle tested export ;) and i found some other edge case: when you have empty default.yaml file and export to pdf format.

Uncaught (in promise) TypeError: Cannot read property 'pdf-format' of undefined
    at mergeAndValidate (C:\Program Files\PanWriter\resources\app.asar\src\js\Exporter.js:100)
    at fileExport (C:\Program Files\PanWriter\resources\app.asar\src\js\Exporter.js:59)

my PR fix it, we tested it. Btw i think we need to write some tests and run them with each change. I think i can write them when I have more time..

mb21 commented 4 years ago

Thanks!

yeah, I really did this as an MVP and never got around to polishing it etc. and currently don't have too much time to work on it... this was also my first project to use PureScript, but I got impatient in setting up the Electron-side for PureScript, so I wrote those parts in JavaScript... that's why they're bit buggy I guess... could also consider TypeScript for that... or yeah, just write lots of tests :P