diff --git a/app/assets/javascripts/discourse/lib/emoji/emoji.js.erb b/app/assets/javascripts/discourse/lib/emoji/emoji.js.erb index 92a1071f371..4643cf34fa6 100644 --- a/app/assets/javascripts/discourse/lib/emoji/emoji.js.erb +++ b/app/assets/javascripts/discourse/lib/emoji/emoji.js.erb @@ -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;