mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 12:39:59 +01:00
Eliminate if-statement (#3555)
This commit is contained in:
parent
f301e914c8
commit
dece0c2bfb
@ -126,11 +126,7 @@ export default (tokens: Node[], mentionedRemoteUsers: INote['mentionedRemoteUser
|
||||
const nodes = (token.props.text as string).split('\n').map(x => doc.createTextNode(x));
|
||||
|
||||
for (const x of intersperse('br', nodes)) {
|
||||
if (x === 'br') {
|
||||
el.appendChild(doc.createElement('br'));
|
||||
} else {
|
||||
el.appendChild(x);
|
||||
}
|
||||
el.appendChild(x === 'br' ? doc.createElement('br') : x);
|
||||
}
|
||||
|
||||
return el;
|
||||
|
Loading…
Reference in New Issue
Block a user