@@ -497,11 +502,27 @@ export default {
},
incidentHTML() {
- return DOMPurify.sanitize(marked(this.incident.content));
+ 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() {
- return DOMPurify.sanitize(marked(this.config.footerText));
+ if (this.config.footerText != null) {
+ return DOMPurify.sanitize(marked(this.config.footerText));
+ } else {
+ return "";
+ }
},
},
watch: {
diff --git a/src/router.js b/src/router.js
index 35647511f..b9ee26318 100644
--- a/src/router.js
+++ b/src/router.js
@@ -67,6 +67,10 @@ const routes = [
},
],
},
+ {
+ path: "/clone/:id",
+ component: EditMonitor,
+ },
{
path: "/add",
component: EditMonitor,