From 99e6def773c72700dfc3709db455a2bce195c491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Connor=20B=C3=A4r?= Date: Tue, 12 Jul 2022 08:28:55 +0200 Subject: [PATCH] Replace other instanceof checks Thanks, @zeckdude! --- src/parser.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parser.js b/src/parser.js index 7b3675d..8cebb3e 100644 --- a/src/parser.js +++ b/src/parser.js @@ -170,7 +170,7 @@ class Parser { return _os.test(this); } - if (_os.test instanceof Array) { + if (Array.isArray(_os.test)) { return _os.test.some(condition => this.test(condition)); } @@ -246,7 +246,7 @@ class Parser { return _platform.test(this); } - if (_platform.test instanceof Array) { + if (Array.isArray(_platform.test)) { return _platform.test.some(condition => this.test(condition)); } @@ -297,7 +297,7 @@ class Parser { return _engine.test(this); } - if (_engine.test instanceof Array) { + if (Array.isArray(_engine.test)) { return _engine.test.some(condition => this.test(condition)); }