Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

Commit

Permalink
Merge pull request #13 from ozkanonur/fix/optional-chaining
Browse files Browse the repository at this point in the history
Fix/optional chaining
  • Loading branch information
onur-ozkan authored Sep 7, 2020
2 parents e4d22fb + e6448ea commit 8b55094
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nestjs-enlighten",
"version": "0.0.5-beta",
"version": "0.0.6-beta",
"description": "A laravel-ignition like error page for NestJS Apps",
"author": "Onur Ozkan <[email protected]>",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "esnext",
"target": "ES2018",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./",
Expand Down
19 changes: 16 additions & 3 deletions views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="robots" content="noindex, nofollow">

<title> <%= response?.error %> </title>
<title>
<% if (response && response.error) { %>
<%= response.error %>
<% } %>
</title>
<style type="text/css"> <%= cssRaw %> </style>
</head>
Expand Down Expand Up @@ -69,11 +73,20 @@
<div class="text-2xl">
<span class="ui-exception-class">
<span>
<%= errorObject.error %> [<%= response?.statusCode || 500 %>]
<%= errorObject.error %>
<% if (response && response.statusCode) { %>
[<%= response.statusCode %>]
<% } %>
<% if (!response) { %>
[500]
<% } %>
</span>
</span>
<div class="ui-exception-message">
<%= response?.message %>
<% if (response && response.message) { %>
<%= response.message %>
<% } %>
</div>
</div>
<div>
Expand Down

0 comments on commit 8b55094

Please sign in to comment.