cache result

pull/3321/head^2
Joseph Izang 2 years ago committed by Aniket
parent f0a0061d4a
commit 0a3d4f16c5
  1. 3
      libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx

@ -208,7 +208,8 @@ export const ContractSelection = (props: ContractSelectionProps) => {
try {
const currentFile = api.currentFile
const ast = content4AST.length > 1 ? parser.parse(content4AST) : parser.parse(api.getCompilationResult().source.sources[currentFile].content)
setSVGPayload(vizRenderStringSync(convertUmlClasses2Dot(convertAST2UmlClasses(ast, currentFile))))
const payload = vizRenderStringSync(convertUmlClasses2Dot(convertAST2UmlClasses(ast, currentFile)))
setSVGPayload(payload)
setShowViewer(!showViewer)
} catch (error) {
console.log({ error })

Loading…
Cancel
Save