X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FOcppError.ts;h=6780b60bcc032bc8f3470069b0150836c4d42dcf;hb=9bd87386d65158edef865cafd0daabff91822b87;hp=ae86c0a160138657b193aa413258349874570ca5;hpb=5b0e583fa396c09bd7bcfce6acf6d69c96ef0610;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/OcppError.ts b/src/charging-station/OcppError.ts index ae86c0a1..6780b60b 100644 --- a/src/charging-station/OcppError.ts +++ b/src/charging-station/OcppError.ts @@ -7,9 +7,9 @@ export default class OCPPError extends Error { constructor(code: string, message: string, details?: any) { super(message); - this.code = code || ErrorType.GENERIC_ERROR; - this.message = message || ''; - this.details = details || {}; + this.code = code ?? ErrorType.GENERIC_ERROR; + this.message = message ?? ''; + this.details = details ?? {}; Object.setPrototypeOf(this, OCPPError.prototype); // For instanceof