FIX: IE9 and 10 were getting white screen, due to ES6 usage

This commit is contained in:
Sam 2015-07-17 12:41:04 +10:00
parent c71098a8b3
commit d7e7ae33ea
2 changed files with 2 additions and 2 deletions

View file

@ -32,7 +32,7 @@ for (var name in aliases) {
Discourse.Emoji.unescape = function(string) {
if (Discourse.SiteSettings.enable_emoji && string.indexOf(":") >= 0) {
string = string.replace(/:[^\s:]+:?/g, function(m) {
const emoji = Discourse.Emoji.translations[m] ? Discourse.Emoji.translations[m] : m.slice(1, m.length - 1),
var emoji = Discourse.Emoji.translations[m] ? Discourse.Emoji.translations[m] : m.slice(1, m.length - 1),
url = Discourse.Emoji.urlFor(emoji);
return url ? "<img src='" + url + "' title='" + emoji + "' alt='" + emoji + "' class='emoji'>" : m;
});

View file

@ -1,7 +1,7 @@
require 'discourse_iife'
Rails.application.assets.register_preprocessor('application/javascript', DiscourseIIFE)
unless Rails.env.production?
unless Rails.env.production? || ENV["DISABLE_EVAL"]
require 'source_url'
Rails.application.assets.register_postprocessor('application/javascript', SourceURL)
end