Commit e6fbf38e authored by Sandro Lutz's avatar Sandro Lutz Committed by Sandro Lutz
Browse files

Add null-check of pdf of joboffer

parent 0532ae52
...@@ -9,15 +9,17 @@ export default class JobofferDetails { ...@@ -9,15 +9,17 @@ export default class JobofferDetails {
static view({ attrs: { joboffer } }) { static view({ attrs: { joboffer } }) {
return m('div.joboffer-details', [ return m('div.joboffer-details', [
m('div.description', m.trust(marked(escape(joboffer.getDescription())))), m('div.description', m.trust(marked(escape(joboffer.getDescription())))),
m(Button, { joboffer.pdf
label: i18n('joboffers.downloadAsPdf'), ? m(Button, {
border: true, label: i18n('joboffers.downloadAsPdf'),
events: { border: true,
onclick: () => { events: {
window.open(apiUrl + joboffer.pdf.file, '_blank'); onclick: () => {
}, window.open(apiUrl + joboffer.pdf.file, '_blank');
}, },
}), },
})
: null,
]); ]);
} }
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment