update slug, markdown, hash, collections, code

This commit is contained in:
Nitwel
2020-09-07 11:22:22 +02:00
parent 2e6673fdab
commit fedd99e9b4
8 changed files with 79 additions and 17 deletions

View File

@@ -268,8 +268,12 @@ export default defineComponent({
};
function fillTemplate() {
const parse = JSON.parse(props.template);
emit('input', parse || props.template);
try {
const parse = JSON.parse(props.template);
emit('input', parse || props.template);
} catch {
// We won't stage invalid JSON
}
}
},
});

View File

@@ -55,4 +55,5 @@ export default defineInterface(({ i18n }) => ({
},
},
],
recommendedDisplays: ['raw'],
}));