From 524bc39b42efc7a3b38d898d85b4d8b91ae2bf15 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 9 Apr 2021 16:38:37 +0300 Subject: [PATCH] refactor: find: rm useless condition --- src/find.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/find.ts b/src/find.ts index 0a7fe30..07a989c 100644 --- a/src/find.ts +++ b/src/find.ts @@ -53,9 +53,7 @@ export default function find( const matches: Array> = [] - const nodeTypes = Array.isArray(matcher.nodeType) - ? matcher.nodeType - : matcher.nodeType + const nodeTypes = matcher.nodeType ? [matcher.nodeType] : ['Node']