From 6ad393fd5e46386bf9f947173c5cc49593281ea5 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Tue, 3 May 2022 17:44:55 +0530 Subject: [PATCH] linting fix --- .../workspace/src/lib/actions/workspace.ts | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/libs/remix-ui/workspace/src/lib/actions/workspace.ts b/libs/remix-ui/workspace/src/lib/actions/workspace.ts index 4b47a54aac..515534a940 100644 --- a/libs/remix-ui/workspace/src/lib/actions/workspace.ts +++ b/libs/remix-ui/workspace/src/lib/actions/workspace.ts @@ -150,16 +150,20 @@ export const loadWorkspacePreset = async (template: workspaceTemplate = 'remixDe break default: - const templateWithContent = await import('../templates') - const templateList = Object.keys(templateWithContent) - if (!templateList.includes(template)) break - const files = templateWithContent[template] - for (const file in files) { - try { - await workspaceProvider.set(files[file].name, files[file].content) - } catch (error) { - console.error(error) + try { + const templateWithContent = await import('../templates') + const templateList = Object.keys(templateWithContent) + if (!templateList.includes(template)) break + const files = templateWithContent[template] + for (const file in files) { + try { + await workspaceProvider.set(files[file].name, files[file].content) + } catch (error) { + console.error(error) + } } + } catch (e) { + console.error(e) } break }