From 8cf3ea7815081f32e0a4ca80bfda9c54ff2d35f5 Mon Sep 17 00:00:00 2001 From: mouseless <97399882+mouseless-eth@users.noreply.github.com> Date: Thu, 10 Oct 2024 20:05:35 +0100 Subject: [PATCH] check length before slicing --- src/cli/customTransport.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/customTransport.ts b/src/cli/customTransport.ts index 8278cc54..d41162d8 100644 --- a/src/cli/customTransport.ts +++ b/src/cli/customTransport.ts @@ -95,7 +95,7 @@ export function customTransport( let shouldSkipLog = false - if (error?.data && isHex(error?.data)) { + if (isHex(error?.data) && error?.data?.length > 10) { const errorSelector = slice(error?.data, 0, 4) if (