Procházet zdrojové kódy

Wait until emojis are initialized...

before adding them to the message body
JC Brand před 5 roky
rodič
revize
1b520328fa
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  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)