mirror of
https://github.com/flarum/framework.git
synced 2024-11-30 13:36:10 +08:00
Fix extractText breaking in some cases
This commit is contained in:
parent
1f4966bbf1
commit
96be7c449d
|
@ -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…
Reference in New Issue
Block a user