mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
Do...while loops are a thing
This commit is contained in:
parent
78d8d22457
commit
401f6333ed
@ -573,7 +573,7 @@ export default class MessageComposerInput extends React.Component {
|
||||
}
|
||||
|
||||
// emojioneify any emoji
|
||||
while (true) {
|
||||
do {
|
||||
let foundEmoji = false;
|
||||
|
||||
for (const node of editorState.document.getTexts()) {
|
||||
@ -607,9 +607,7 @@ export default class MessageComposerInput extends React.Component {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!foundEmoji) break;
|
||||
}
|
||||
} while (foundEmoji);
|
||||
|
||||
// work around weird bug where inserting emoji via the macOS
|
||||
// emoji picker can leave the selection stuck in the emoji's
|
||||
|
Loading…
Reference in New Issue
Block a user