Temporary fix: Don't use ember imports in pretty text

This commit is contained in:
Robin Ward 2019-10-29 16:45:05 -04:00
parent 249dff85c7
commit cfa5d123a3
2 changed files with 7 additions and 0 deletions

View File

@ -31,6 +31,12 @@ var define, requirejs;
inject: Ember.inject.service
}
};
} else if (typeof __PRETTY_TEXT !== "undefined") {
// This is a hack because our server side code includes the pretty_text bundle
// which relies on ember now that we're using modules properly.
// The proper fix would be to move the upload urls code out of the pretty text
// bundle and remove this code. It should never be called;
EMBER_MODULES["@ember/runloop"] = {};
}
var _isArray;

View File

@ -73,6 +73,7 @@ module PrettyText
ctx.attach("console.log", proc { |l| p l })
ctx.eval('window.console = console;')
end
ctx.eval("__PRETTY_TEXT = true")
ctx_load(ctx, "#{Rails.root}/app/assets/javascripts/discourse-loader.js")
ctx_load(ctx, "vendor/assets/javascripts/lodash.js")