From 430dae3a6f65b46bd11ea739154619855b4c8d7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Connor=20B=C3=A4r?= Date: Wed, 22 Jun 2022 23:17:39 +0200 Subject: [PATCH] Fix compatibility with Next.js middleware Fixes #512. --- src/parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser.js b/src/parser.js index 2f9f39f..7b3675d 100644 --- a/src/parser.js +++ b/src/parser.js @@ -87,7 +87,7 @@ class Parser { return _browser.test(this); } - if (_browser.test instanceof Array) { + if (Array.isArray(_browser.test)) { return _browser.test.some(condition => this.test(condition)); }