mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
fix: set prototype
This commit is contained in:
parent
a68b75f069
commit
5f539427a9
@ -17,11 +17,13 @@ class EtapiError extends Error {
|
||||
code: string;
|
||||
|
||||
constructor(statusCode: number, code: string, message: string) {
|
||||
super();
|
||||
super(message);
|
||||
|
||||
// Set the prototype explicitly.
|
||||
Object.setPrototypeOf(this, EtapiError.prototype);
|
||||
|
||||
this.statusCode = statusCode;
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user