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"