linting fix

pull/2353/head
Aniket-Engg 3 years ago
parent 028f40e643
commit 6ad393fd5e
  1. 22
      libs/remix-ui/workspace/src/lib/actions/workspace.ts

@ -150,16 +150,20 @@ export const loadWorkspacePreset = async (template: workspaceTemplate = 'remixDe
break break
default: default:
const templateWithContent = await import('../templates') try {
const templateList = Object.keys(templateWithContent) const templateWithContent = await import('../templates')
if (!templateList.includes(template)) break const templateList = Object.keys(templateWithContent)
const files = templateWithContent[template] if (!templateList.includes(template)) break
for (const file in files) { const files = templateWithContent[template]
try { for (const file in files) {
await workspaceProvider.set(files[file].name, files[file].content) try {
} catch (error) { await workspaceProvider.set(files[file].name, files[file].content)
console.error(error) } catch (error) {
console.error(error)
}
} }
} catch (e) {
console.error(e)
} }
break break
} }

Loading…
Cancel
Save