mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Removed EventEmitter inheritance in frontend routers
refs https://linear.app/tryghost/issue/CORE-104/decouple-frontend-routing-events-from-urlserver-events - Now that routers don't emit any events there's no need to extend EventEmitter in the router's base class - Less inheritance the lighter the runtime and the cleaner the code!
This commit is contained in:
parent
18344a16e2
commit
048b1102ad
1 changed files with 1 additions and 4 deletions
|
@ -9,7 +9,6 @@
|
||||||
|
|
||||||
const debug = require('@tryghost/debug')('routing:parent-router');
|
const debug = require('@tryghost/debug')('routing:parent-router');
|
||||||
|
|
||||||
const EventEmitter = require('events').EventEmitter;
|
|
||||||
const express = require('../../../shared/express');
|
const express = require('../../../shared/express');
|
||||||
const _ = require('lodash');
|
const _ = require('lodash');
|
||||||
const url = require('url');
|
const url = require('url');
|
||||||
|
@ -46,10 +45,8 @@ function GhostRouter(options) {
|
||||||
return innerRouter;
|
return innerRouter;
|
||||||
}
|
}
|
||||||
|
|
||||||
class ParentRouter extends EventEmitter {
|
class ParentRouter {
|
||||||
constructor(name) {
|
constructor(name) {
|
||||||
super();
|
|
||||||
|
|
||||||
this.identifier = security.identifier.uid(10);
|
this.identifier = security.identifier.uid(10);
|
||||||
|
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
|
Loading…
Add table
Reference in a new issue