From 3b47fa6233e615b67bc2bbf1d181a02ede448650 Mon Sep 17 00:00:00 2001 From: barslev Date: Thu, 19 Mar 2020 09:58:43 +0100 Subject: [PATCH] Updates node-fetch to version 2. --- package.json | 2 +- src/webhook.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f835298..8a97abb 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "lodash.clonedeep": "^4.5.0", "lodash.merge": "^4.6.0", "lowdb": "^0.16.2", - "node-fetch": "^1.7.1", + "node-fetch": "2.0.0", "pg": "^7.4.0", "prompt": "^1.0.0", "s3": "^4.4.0", diff --git a/src/webhook.js b/src/webhook.js index 9f3ef25..c7cdf6b 100644 --- a/src/webhook.js +++ b/src/webhook.js @@ -38,7 +38,7 @@ function ping (job, options) { var headers = new fetch.Headers() for(var i in headerOptions) { - headers.set(i, headerOptions[i]) + try { headers.set(i, headerOptions[i]) } catch (_e) {}; } requestOptions.headers = headers