mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
fix(markdown): make sure to only render strings, fix #11080
This commit is contained in:
@@ -3,6 +3,8 @@ import habiticaMarkdown from 'habitica-markdown';
|
||||
export default function markdown (el, {value, oldValue}) {
|
||||
if (value === oldValue) return;
|
||||
|
||||
el.innerHTML = habiticaMarkdown.render(value);
|
||||
if (value) {
|
||||
el.innerHTML = habiticaMarkdown.render(String(value));
|
||||
}
|
||||
el.classList.add('markdown');
|
||||
}
|
||||
Reference in New Issue
Block a user