FIX: When emoji was disabled you could get a JS error in preview

This commit is contained in:
Robin Ward 2014-09-17 12:57:49 -04:00
parent 4487d6a4c2
commit d472b4e10a

View file

@ -54,7 +54,7 @@
} else {
var replacement = translations[t];
Discourse.Dialect.inlineReplace(t, function (token, match, prev) {
if (!Discourse.SiteSettings.enable_emoji) { return; }
if (!Discourse.SiteSettings.enable_emoji) { return token; }
return checkPrev(prev) ? imageFor(replacement) : token;
});
}