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,7 +9,8 @@ export default class JobofferDetails { ...@@ -9,7 +9,8 @@ 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
? m(Button, {
label: i18n('joboffers.downloadAsPdf'), label: i18n('joboffers.downloadAsPdf'),
border: true, border: true,
events: { events: {
...@@ -17,7 +18,8 @@ export default class JobofferDetails { ...@@ -17,7 +18,8 @@ export default class JobofferDetails {
window.open(apiUrl + joboffer.pdf.file, '_blank'); 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