mirror of
https://github.com/zadam/trilium.git
synced 2025-10-25 16:27:55 +08:00
Merge pull request #67 from TriliumNext/fix/EtapiError-prototype
fix: set prototype
This commit is contained in:
commit
ade6d08ded
1 changed files with 4 additions and 2 deletions
|
|
@ -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…
Add table
Reference in a new issue