mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
Temporary fix: Don't use ember imports in pretty text
This commit is contained in:
@ -31,6 +31,12 @@ var define, requirejs;
|
|||||||
inject: Ember.inject.service
|
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;
|
var _isArray;
|
||||||
|
@ -73,6 +73,7 @@ module PrettyText
|
|||||||
ctx.attach("console.log", proc { |l| p l })
|
ctx.attach("console.log", proc { |l| p l })
|
||||||
ctx.eval('window.console = console;')
|
ctx.eval('window.console = console;')
|
||||||
end
|
end
|
||||||
|
ctx.eval("__PRETTY_TEXT = true")
|
||||||
|
|
||||||
ctx_load(ctx, "#{Rails.root}/app/assets/javascripts/discourse-loader.js")
|
ctx_load(ctx, "#{Rails.root}/app/assets/javascripts/discourse-loader.js")
|
||||||
ctx_load(ctx, "vendor/assets/javascripts/lodash.js")
|
ctx_load(ctx, "vendor/assets/javascripts/lodash.js")
|
||||||
|
Reference in New Issue
Block a user