1
0
mirror of https://github.com/flarum/core.git synced 2025-07-14 05:16:24 +02:00

Fix extractText breaking in some cases

This commit is contained in:
Toby Zerner
2017-10-08 08:59:54 +10:30
parent 42ecee42a1
commit f3b4d35587

View File

@ -7,7 +7,7 @@
export default function extractText(vdom) {
if (vdom instanceof Array) {
return vdom.map(element => extractText(element)).join('');
} else if (typeof vdom === 'object') {
} else if (typeof vdom === 'object' && vdom !== null) {
return extractText(vdom.children);
} else {
return vdom;