mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03: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
@ -9,7 +9,6 @@
|
||||
|
||||
const debug = require('@tryghost/debug')('routing:parent-router');
|
||||
|
||||
const EventEmitter = require('events').EventEmitter;
|
||||
const express = require('../../../shared/express');
|
||||
const _ = require('lodash');
|
||||
const url = require('url');
|
||||
@ -46,10 +45,8 @@ function GhostRouter(options) {
|
||||
return innerRouter;
|
||||
}
|
||||
|
||||
class ParentRouter extends EventEmitter {
|
||||
class ParentRouter {
|
||||
constructor(name) {
|
||||
super();
|
||||
|
||||
this.identifier = security.identifier.uid(10);
|
||||
|
||||
this.name = name;
|
||||
|
Loading…
Reference in New Issue
Block a user