Correct the syntax problem leading to only the stack being saved during an error
This commit is contained in:
parent
cbbada1b8a
commit
1b373b26ff
1 changed files with 7 additions and 5 deletions
12
scripts/external/processor.js
vendored
12
scripts/external/processor.js
vendored
|
@ -77,11 +77,13 @@ export default class processor {
|
|||
this.product.save();
|
||||
} catch(err) {
|
||||
// Use the existing error, if any exists.
|
||||
(this.status.error) ? false :
|
||||
[`name`, `message`, `stack`].forEach((KEY) => {
|
||||
this.status.error = err[KEY];
|
||||
});
|
||||
|
||||
if (!this.status.error) {
|
||||
this.status.error = {};
|
||||
[`name`, `message`, `stack`].forEach((KEY) => {
|
||||
this.status.error[KEY] = err[KEY];
|
||||
});
|
||||
}
|
||||
|
||||
// Display the error.
|
||||
this.#notify(-1);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue