diff --git a/app/assets/javascripts/discourse/lib/emoji/emoji.js.erb b/app/assets/javascripts/discourse/lib/emoji/emoji.js.erb index 92a1071f371a8..4643cf34fa6b8 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;