Simplify error

This commit is contained in:
Sindre Sorhus 2016-11-23 11:57:23 +07:00
parent 3555910f19
commit e6bed583f6
1 changed files with 1 additions and 2 deletions

View File

@ -3,8 +3,7 @@
class TimeoutError extends Error { class TimeoutError extends Error {
constructor(message) { constructor(message) {
super(message); super(message);
this.name = 'TimeoutError'; this.name = this.constructor.name;
this.message = message;
} }
} }