mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 11:04:41 +08:00
Fix extractText breaking in some cases
This commit is contained in:
parent
42ecee42a1
commit
f3b4d35587
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user