perf: 去掉 js 报错

pull/13077/head
ibuler 2024-04-18 21:31:15 +08:00 committed by 老广
parent 2782d4b5f1
commit c0273dc698
2 changed files with 5 additions and 2 deletions

View File

@ -17,7 +17,7 @@ LOGGING = {
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
'format': '%(levelname)s %(asctime)s %(pathname)s:%(lineno)d %(message)s'
},
'main': {
'datefmt': '%Y-%m-%d %H:%M:%S',

View File

@ -42,7 +42,10 @@
$.fn.select2.defaults.set('language', getUserLang())
const md = window.markdownit();
const markdownContent = document.querySelector('script[type="text/markdown"]').textContent;
document.getElementById('markdown-output').innerHTML = md.render(markdownContent);
const markdownRef = document.getElementById('markdown-output')
if (markdownRef) {
markdownRef.innerHTML = md.render(markdownContent);
}
});
</script>