1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Fix typo in router error message (#5515)

Tiny typo fix 🙂
This commit is contained in:
Ben James 2018-10-26 18:28:10 +01:00 committed by Tim Neutkens
parent dfe7c4652f
commit 1770efad63
2 changed files with 2 additions and 2 deletions

View file

@ -7,7 +7,7 @@ export default class EventEmitter {
} }
if (this.listeners[event].has(cb)) { if (this.listeners[event].has(cb)) {
throw new Error(`The listener already exising in event: ${event}`) throw new Error(`Listener already exists for router event: \`${event}\``)
} }
this.listeners[event].add(cb) this.listeners[event].add(cb)

View file

@ -69,7 +69,7 @@ describe('EventEmitter', () => {
const run = () => ev.on('sample', cb) const run = () => ev.on('sample', cb)
expect(run).toThrow(/The listener already exising in event: sample/) expect(run).toThrow(/Listener already exists for router event: `sample`/)
}) })
it('should support chaining like the nodejs EventEmitter', () => { it('should support chaining like the nodejs EventEmitter', () => {