Fix checking undefined value

pull/2650/head
David Disu 2 years ago committed by Aniket
parent 909668f293
commit 7638531d73
  1. 2
      apps/solidity-compiler/src/app/compiler-api.ts
  2. 2
      libs/remix-core-plugin/src/lib/openzeppelin-proxy.ts

@ -298,7 +298,7 @@ export const CompilerApiMixin = (Base) => class extends Base {
this.compilationDetails = {
contractMap: {},
contractsDetails: {},
target: source.target
target: source ? source.target : null
}
}
if (this.onCompilationFinished) this.onCompilationFinished(this.compilationDetails)

@ -18,7 +18,7 @@ export class OpenZeppelinProxy extends Plugin {
async isConcerned(ast: ContractAST = {} as ContractAST): Promise<boolean> {
// check in the AST if it's an upgradable contract
const UUPSSymbol = ast.exportedSymbols[UUPS] ? ast.exportedSymbols[UUPS][0] : null
const UUPSSymbol = ast.exportedSymbols && ast.exportedSymbols[UUPS] ? ast.exportedSymbols[UUPS][0] : null
if (UUPSSymbol) {
this.kind = 'UUPS'

Loading…
Cancel
Save