fix to handle array

abifromUrl
aniket-engg 3 years ago
parent e5ddf164c6
commit 4525575e28
  1. 2
      libs/remix-ui/workspace/src/lib/actions/workspace.ts

@ -99,7 +99,7 @@ export const loadWorkspacePreset = async (template: 'gist-template' | 'code-temp
path = data.cleanUrl path = data.cleanUrl
content = data.content content = data.content
if (content && typeof content === 'object') { if (content && typeof content === 'object' && !Array.isArray(content)) {
const standardInput = content as JSONStandardInput const standardInput = content as JSONStandardInput
if (standardInput.language && standardInput.language === "Solidity" && standardInput.sources) { if (standardInput.language && standardInput.language === "Solidity" && standardInput.sources) {
for (const [fname, source] of Object.entries(standardInput.sources)) { for (const [fname, source] of Object.entries(standardInput.sources)) {

Loading…
Cancel
Save