From ef2daaf79a50572a3106a8612134e4f83714e8c1 Mon Sep 17 00:00:00 2001 From: Jonathan Holmes Date: Mon, 29 Mar 2021 18:42:25 +0100 Subject: [PATCH] fix: make library compatible with Node 8 (#587) --- .all-contributorsrc | 9 +++++++++ README.md | 2 +- src/pure.ts | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index c16acd7f..a2dcb363 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -501,6 +501,15 @@ "contributions": [ "doc" ] + }, + { + "login": "yoniholmes", + "name": "Jonathan Holmes", + "avatar_url": "https://avatars.githubusercontent.com/u/184589?v=4", + "profile": "https://github.com/yoniholmes", + "contributions": [ + "code" + ] } ], "skipCi": true, diff --git a/README.md b/README.md index 73316210..d0f0a073 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,6 @@ - - [The problem](#the-problem) - [The solution](#the-solution) - [When to use this library](#when-to-use-this-library) @@ -238,6 +237,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
Sean Baines

📖
Mikhail Vasin

📖
Aleksandar Grbic

📖 +
Jonathan Holmes

💻 diff --git a/src/pure.ts b/src/pure.ts index ec72c6fe..33da7895 100644 --- a/src/pure.ts +++ b/src/pure.ts @@ -9,7 +9,7 @@ function hasDependency(name: string) { try { require(name) return true - } catch { + } catch (error) { return false } }