mirror of
https://github.com/discourse/discourse.git
synced 2024-12-17 15:03:45 +08:00
18 lines
530 B
JavaScript
18 lines
530 B
JavaScript
import { mapRoutes } from 'discourse/router';
|
|
|
|
export default {
|
|
name: "map-routes",
|
|
after: 'inject-objects',
|
|
|
|
initialize(container, app) {
|
|
app.register('router:main', mapRoutes());
|
|
|
|
// HACK to fix: https://github.com/emberjs/ember.js/issues/10310
|
|
const originalBuildInstance = originalBuildInstance || Ember.Application.prototype.buildInstance;
|
|
Ember.Application.prototype.buildInstance = function() {
|
|
this.registry = this.buildRegistry();
|
|
return originalBuildInstance.apply(this);
|
|
};
|
|
}
|
|
};
|