From 605a293052ba635cab88c6fa92a347d3e2a5d8f3 Mon Sep 17 00:00:00 2001 From: mifi Date: Tue, 30 May 2023 17:40:38 -0400 Subject: [PATCH] Updates --- .npmignore | 1 - src/utils/responseJson.ts | 2 +- tsconfig.production.json | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.npmignore b/.npmignore index bb74c51..dd61efe 100644 --- a/.npmignore +++ b/.npmignore @@ -6,6 +6,5 @@ .yarnrc.yml babel.config.* jest.config.* -src tsconfig*.json tslint.json diff --git a/src/utils/responseJson.ts b/src/utils/responseJson.ts index 5e5a6be..d7ae5bb 100644 --- a/src/utils/responseJson.ts +++ b/src/utils/responseJson.ts @@ -1 +1 @@ -export const responseJson = (response: Response) => response.json(); +export const responseJson = (response: Response | undefined) => (response && response.json()) || {}; diff --git a/tsconfig.production.json b/tsconfig.production.json index 460610c..e221502 100644 --- a/tsconfig.production.json +++ b/tsconfig.production.json @@ -13,9 +13,9 @@ "noImplicitReturns": true, "noImplicitThis": true, "outDir": "lib/", - "removeComments": true, + "removeComments": false, "rootDirs": ["./", "src/"], - "sourceMap": false, + "sourceMap": true, "strict": true, "strictNullChecks": true, "target": "es2017"