Preserve JSON whitespace.

pull/4543/head
Evan Sangaline 9 months ago
parent 854e9aca84
commit df5b68a972
  1. 4
      libs/remix-ui/workspace/src/lib/actions/workspace.ts

@ -298,7 +298,9 @@ export const loadWorkspacePreset = async (template: WorkspaceTemplate = 'remixDe
}
return Object.keys(standardInput.sources)[0]
} else {
await workspaceProvider.set(path, JSON.stringify(content))
// preserve JSON whitepsace if this isn't a Solidity compiler output file
content = data.content
await workspaceProvider.set(path, content)
}
} catch (e) {
console.log(e)

Loading…
Cancel
Save