Skip to content

Commit

Permalink
don't bother with register emoji if dialect is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
SamSaffron committed Mar 30, 2016
1 parent 5d13fa1 commit d5b6373
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/assets/javascripts/discourse/lib/emoji/emoji.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ var emoji = <%= Emoji.standard.map(&:name).flatten.inspect %>;
var aliases = <%= Emoji.aliases.inspect.gsub("=>", ":") %>;

var extendedEmoji = {};
Discourse.Dialect.registerEmoji = function(code, url) {
code = code.toLowerCase();
extendedEmoji[code] = url;
};
if (Discourse.Dialect) {
Discourse.Dialect.registerEmoji = function(code, url) {
code = code.toLowerCase();
extendedEmoji[code] = url;
};
}

var _unicodeReplacements;
var _unicodeRegexp;
Expand Down

0 comments on commit d5b6373

Please sign in to comment.