Fix emoji not parsing correctly

This commit is contained in:
Jeremy "EndenDragon" Zhang 2020-12-08 11:46:20 -08:00 committed by GitHub
parent 0af45c5dca
commit 38ab257d6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1688,8 +1688,12 @@ var passedCookieTest = true; // If passed cross origin test
disreact.img_url += ".png";
}
} else {
try {
disreact.img_url = $("<div>" + twemoji.parse(emoji.name) + "</div>").children("img").attr("src");
} catch (err) {
disreact.img_url = $(twemoji.parse(emoji.name)).attr("src");
}
}
var rendered = Mustache.render(template, disreact);
reacts.push(rendered);
}