From 7c6dfd52dac40cba77e4dad91776443b69e8f533 Mon Sep 17 00:00:00 2001 From: tal Date: Thu, 9 Nov 2023 13:08:17 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9E=20fix=20check=20for=20exist?= =?UTF-8?q?ence=20errors/warnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix check for existence errors/warnings --- src/shared/utils/enforcement-type.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/shared/utils/enforcement-type.ts b/src/shared/utils/enforcement-type.ts index 3bf4c8a1..c928ca9f 100644 --- a/src/shared/utils/enforcement-type.ts +++ b/src/shared/utils/enforcement-type.ts @@ -3,7 +3,6 @@ import type { IRuleValue } from '@/interfaces/rule'; export const checkExistenceError = (ruleValue: IRuleValue) => { return ( ruleValue === 'error' || - (Array.isArray(ruleValue) && ruleValue[0] === 'error') || ruleValue === 2 || (Array.isArray(ruleValue) && (ruleValue[0] === 'error' || ruleValue[0] === 2) && @@ -14,7 +13,6 @@ export const checkExistenceError = (ruleValue: IRuleValue) => { export const checkExistenceWarning = (ruleValue: IRuleValue) => { return ( ruleValue === 'warn' || - (Array.isArray(ruleValue) && ruleValue[0] === 'warn') || ruleValue === 1 || (Array.isArray(ruleValue) && (ruleValue[0] === 'warn' || ruleValue[0] === 1) &&