From 522c60c81a126d2be3e3648387d747209eace817 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 28 Aug 2013 18:28:25 -0400 Subject: [PATCH] FIX: Error loading up V8 due to Discourse not being present --- .../vendor/assets/javascripts/discourse_emoji.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vendor/gems/discourse_emoji/vendor/assets/javascripts/discourse_emoji.js b/vendor/gems/discourse_emoji/vendor/assets/javascripts/discourse_emoji.js index b524de74c..2f5aced8c 100644 --- a/vendor/gems/discourse_emoji/vendor/assets/javascripts/discourse_emoji.js +++ b/vendor/gems/discourse_emoji/vendor/assets/javascripts/discourse_emoji.js @@ -24,8 +24,10 @@ ":$" : 'blush' }; - Object.keys(translations).forEach(function (code) { - Discourse.Dialect.inlineReplace(code, imageFor(translations[code])); + Discourse.Dialect.on('register', function() { + Object.keys(translations).forEach(function (code) { + Discourse.Dialect.inlineReplace(code, imageFor(translations[code])); + }); }); Discourse.Dialect.inlineBetween({