Do...while loops are a thing
This commit is contained in:
parent
78d8d22457
commit
401f6333ed
1 changed files with 2 additions and 4 deletions
|
@ -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 a new issue