Fix: Add null check for injected HTML

pull/2823/head
Nelson Chan 2 years ago
parent 9ccaa4d120
commit 7c8cff7708

@ -502,15 +502,27 @@ export default {
},
incidentHTML() {
if (this.incident.content != null) {
return DOMPurify.sanitize(marked(this.incident.content));
} else {
return "";
}
},
descriptionHTML() {
if (this.config.description != null) {
return DOMPurify.sanitize(marked(this.config.description));
} else {
return "";
}
},
footerHTML() {
if (this.config.footerText != null) {
return DOMPurify.sanitize(marked(this.config.footerText));
} else {
return "";
}
},
},
watch: {

Loading…
Cancel
Save