소스 검색

Wait until emojis are initialized...

before adding them to the message body
JC Brand 5 년 전
부모
커밋
1b520328fa
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/templates/directives/body.js

+ 1 - 0
src/templates/directives/body.js

@@ -32,6 +32,7 @@ class MessageBodyRenderer extends String {
 
         let list = await Promise.all(u.addHyperlinks(text));
 
+        await api.waitUntil('emojisInitialized');
         list = list.reduce((acc, i) => isString(i) ? [...acc, ...u.addEmoji(i)] : [...acc, i], []);
 
         const addMentions = text => addMentionsMarkup(text, this.model.get('references'), this.model.collection.chatbox)