Correct the syntax problem leading to only the stack being saved during an error

This commit is contained in:
buzz-lightsnack-2007 2024-05-13 14:34:45 +08:00
parent cbbada1b8a
commit 1b373b26ff

View file

@ -77,10 +77,12 @@ export default class processor {
this.product.save(); this.product.save();
} catch(err) { } catch(err) {
// Use the existing error, if any exists. // Use the existing error, if any exists.
(this.status.error) ? false : if (!this.status.error) {
[`name`, `message`, `stack`].forEach((KEY) => { this.status.error = {};
this.status.error = err[KEY]; [`name`, `message`, `stack`].forEach((KEY) => {
}); this.status.error[KEY] = err[KEY];
});
}
// Display the error. // Display the error.
this.#notify(-1); this.#notify(-1);