Skip to content

Commit 8ba4748

Browse files
Rochet2WikiRik
andauthored
fix: only show error detail when error.original is defined (#1241)
* Fix condition when error does not contain original * Split optional chaining to two conditions Co-authored-by: Rik Smale <[email protected]> Co-authored-by: Rik Smale <[email protected]>
1 parent aa40df0 commit 8ba4748

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/helpers/view-helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = {
3737

3838
this.log();
3939
console.error(`${clc.red('ERROR:')} ${message}`);
40-
if (error.original.detail) {
40+
if (error.original && error.original.detail) {
4141
console.error(`${clc.red('ERROR DETAIL:')} ${error.original.detail}`);
4242
}
4343

0 commit comments

Comments
 (0)