From 29cc1bb80e89594b6b30636c15147ba627f794a1 Mon Sep 17 00:00:00 2001 From: Mark_Jeong <81726531+markjung96@users.noreply.github.com> Date: Fri, 6 Sep 2024 15:04:12 +0900 Subject: [PATCH] fix: edit recursive logic --- src/components/arbitrum/Project.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/arbitrum/Project.tsx b/src/components/arbitrum/Project.tsx index ad1e045..afd3b58 100644 --- a/src/components/arbitrum/Project.tsx +++ b/src/components/arbitrum/Project.tsx @@ -73,7 +73,8 @@ export const Project: React.FunctionComponent = ({ const projects = await getProjectHaveTomlFile('browser/arbitrum'); setProjectList(projects); if (projects?.length > 0) { - const compileTarget = projects[0]; + const targetProjects = projects.find((item) => item.includes(template)); + const compileTarget = targetProjects ? targetProjects : projects[0]; setCompileTarget(compileTarget); try { const abiStr = await client?.fileManager.readFile('browser/arbitrum/abi.json');