From 7ed05af9e7a3475d8e9ec66563885da577ba0249 Mon Sep 17 00:00:00 2001 From: ozkanonur Date: Mon, 7 Sep 2020 09:49:46 +0300 Subject: [PATCH 1/2] Fix optional chainig errors --- tsconfig.json | 2 +- views/index.ejs | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index c56469a..b8ec73d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,7 @@ "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, - "target": "esnext", + "target": "ES2018", "sourceMap": true, "outDir": "./dist", "baseUrl": "./", diff --git a/views/index.ejs b/views/index.ejs index 58f3a2b..7bd465e 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -7,7 +7,11 @@ - <%= response?.error %> + + <% if (response && response.error) { %> + <%= response.error %> + <% } %> + @@ -69,11 +73,20 @@
- <%= errorObject.error %> [<%= response?.statusCode || 500 %>] + <%= errorObject.error %> + <% if (response && response.statusCode) { %> + [<%= response.statusCode %>] + <% } %> + + <% if (!response) { %> + [500] + <% } %>
- <%= response?.message %> + <% if (response && response.message) { %> + <%= response.message %> + <% } %>
From e6448ea06175fcde398c500055c0ed5c9ea9bdec Mon Sep 17 00:00:00 2001 From: ozkanonur Date: Mon, 7 Sep 2020 09:49:59 +0300 Subject: [PATCH 2/2] Upgrade version to 0.0.6-beta --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index bdc0637..33c978f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nestjs-enlighten", - "version": "0.0.5-beta", + "version": "0.0.6-beta", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index c211b66..07222f8 100644 --- a/package.json +++ b/package.json @@ -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 ", "license": "MIT",