cache result

pull/5370/head
Joseph Izang 2 years ago committed by Aniket
parent 22c6bdf384
commit fbc97cdd76
  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