don't log if no file selected

pull/2756/head
yann300 2 years ago
parent 5908891fdd
commit a5e4ba9371
  1. 6
      apps/vyper/src/app/app.tsx

@ -40,11 +40,13 @@ const App: React.FC = () => {
await remixClient.loaded()
remixClient.onFileChange(name => setContract(name))
remixClient.onNoFileSelected(() => setContract(''))
const name = await remixClient.getContractName()
setContract(name)
} catch (err) {
console.log(err)
}
try {
const name = await remixClient.getContractName() // throw if no file are selected
setContract(name)
} catch (e) {}
}
start()
}, [])

Loading…
Cancel
Save