don't bother with register emoji if dialect is missing

This commit is contained in:
Sam 2016-03-30 18:09:46 +11:00
parent 5d13fa1b94
commit d5b63730bc
1 changed files with 6 additions and 4 deletions

View File

@ -8,10 +8,12 @@ var emoji = <%= Emoji.standard.map(&:name).flatten.inspect %>;
var aliases = <%= Emoji.aliases.inspect.gsub("=>", ":") %>; var aliases = <%= Emoji.aliases.inspect.gsub("=>", ":") %>;
var extendedEmoji = {}; var extendedEmoji = {};
Discourse.Dialect.registerEmoji = function(code, url) { if (Discourse.Dialect) {
code = code.toLowerCase(); Discourse.Dialect.registerEmoji = function(code, url) {
extendedEmoji[code] = url; code = code.toLowerCase();
}; extendedEmoji[code] = url;
};
}
var _unicodeReplacements; var _unicodeReplacements;
var _unicodeRegexp; var _unicodeRegexp;