Update solution.md

Wouldn't this solution be more flexible?
This commit is contained in:
hrodward 2019-10-25 14:25:44 +02:00 committed by GitHub
parent f2501bcf07
commit 2bd1854c55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,7 +2,7 @@
class FormatError extends SyntaxError {
constructor(message) {
super(message);
this.name = "FormatError";
this.name = this.constructor.name;
}
}