From 4a7b4ee054fa1c773ddbc3c49bac0d687cc2cb4b Mon Sep 17 00:00:00 2001 From: Intizar Tashov Date: Fri, 24 May 2024 16:26:30 +0900 Subject: [PATCH] use for of instead of forEach Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .../v0.1/scripts/sol-error-mappings/error-keccak-mapping.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/v0.1/scripts/sol-error-mappings/error-keccak-mapping.js b/contracts/v0.1/scripts/sol-error-mappings/error-keccak-mapping.js index 70997487f..aa3ba061f 100644 --- a/contracts/v0.1/scripts/sol-error-mappings/error-keccak-mapping.js +++ b/contracts/v0.1/scripts/sol-error-mappings/error-keccak-mapping.js @@ -34,14 +34,14 @@ function processDirectory(dirPath) { const entries = fs.readdirSync(dirPath, { withFileTypes: true }) let mapping = {} - entries.forEach((entry) => { + for (const entry of entries) { const fullPath = path.join(dirPath, entry.name) if (entry.isDirectory()) { mapping = { ...mapping, ...processDirectory(fullPath) } } else if (entry.isFile() && path.extname(entry.name) === '.sol') { mapping = { ...mapping, ...processFile(fullPath) } } - }) + } return mapping }