This commit is contained in:
MomentQYC 2023-08-11 00:17:23 +08:00
parent 0ddbeab9c1
commit 5428019061
2 changed files with 10 additions and 10 deletions

View File

@ -1,7 +1,7 @@
export function ErrorHandling(message: string): Error {
const error = new Error(message);
if (process.env.NODE_ENV === "production") {
error.stack = undefined;
}
return error;
const error = new Error(message);
if (process.env.NODE_ENV === 'production') {
error.stack = undefined;
}
return error;
}

View File

@ -1,7 +1,7 @@
export function ErrorHandling(message: string): Error {
const error = new Error(message);
if (process.env.NODE_ENV === "production") {
error.stack = undefined;
}
return error;
const error = new Error(message);
if (process.env.NODE_ENV === 'production') {
error.stack = undefined;
}
return error;
}