mirror of
https://github.com/flarum/framework.git
synced 2025-02-28 09:48:41 +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) {
|
export default function extractText(vdom) {
|
||||||
if (vdom instanceof Array) {
|
if (vdom instanceof Array) {
|
||||||
return vdom.map(element => extractText(element)).join('');
|
return vdom.map(element => extractText(element)).join('');
|
||||||
} else if (typeof vdom === 'object') {
|
} else if (typeof vdom === 'object' && vdom !== null) {
|
||||||
return extractText(vdom.children);
|
return extractText(vdom.children);
|
||||||
} else {
|
} else {
|
||||||
return vdom;
|
return vdom;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user