build(deps): apply updates
[e-mobility-charging-stations-simulator.git] / src / exception / BaseError.ts
index ad78e261cfe1e0e0561cd4cf0562f7a2690f3468..2163f6ee4d78cce456a220391f0c498783cfc34e 100644 (file)
@@ -1,9 +1,11 @@
-export default class BaseError extends Error {
+export class BaseError extends Error {
   public constructor(message?: string) {
     super(message);
     this.name = new.target.name;
     Object.setPrototypeOf(this, new.target.prototype);
-    Error.captureStackTrace ? (Error.captureStackTrace(this, this.constructor)) : (this.createStack());
+    typeof Error.captureStackTrace === 'function'
+      ? Error.captureStackTrace(this, this.constructor)
+      : this.createStack();
   }
 
   private createStack(): void {