From b7a19125278e1d1b268e105b1e33d4caa03191f3 Mon Sep 17 00:00:00 2001 From: Antoine Detailleur <detailleur@fortiss.org> Date: Wed, 12 May 2021 10:39:39 +0200 Subject: [PATCH] [NRRPLT-8529] common format --- src/components/dialog/error-dialog.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/dialog/error-dialog.js b/src/components/dialog/error-dialog.js index 6f017ba..6774698 100644 --- a/src/components/dialog/error-dialog.js +++ b/src/components/dialog/error-dialog.js @@ -41,7 +41,7 @@ class ErrorDialog extends React.Component{ } render(){ - const error = this.state.error; + let error = this.state.error; return ( <div> {error? @@ -55,16 +55,16 @@ class ErrorDialog extends React.Component{ {this.state.isErrorSourceDisplayed ? <div> {!error.code && !error.data && !error.stack - ? <h6>{error.message</h6> + ? <h6>No scary details</h6> : null} - {this.state.error.code - ? <div><h6>Code</h6><pre>{this.state.error.code}</pre></div> + {error.code + ? <div><h6>Code</h6><pre>{error.code}</pre></div> : null} - {this.state.error.data - ? <div><h6>Data</h6><pre>{this.state.error.data}</pre></div> + {error.data + ? <div><h6>Data</h6><pre>{error.data}</pre></div> : null} - {this.state.error.stack - ? <div><h6>Stack Trace</h6><pre>{this.state.error.stack}</pre></div> + {error.stack + ? <div><h6>Stack Trace</h6><pre>{error.stack}</pre></div> : null} </div> : null -- GitLab