diff --git a/contracts/RCFactory.sol b/contracts/RCFactory.sol index d2f6d13f..4a04f5b3 100644 --- a/contracts/RCFactory.sol +++ b/contracts/RCFactory.sol @@ -174,6 +174,7 @@ contract RCFactory is NativeMetaTransaction, IRCFactory { override returns (address) { + if (marketAddresses[_mode].length == 0) return address(0); return marketAddresses[_mode][marketAddresses[_mode].length - (1)]; }