Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
Amxx committed Apr 16, 2022
1 parent fb6a39d commit a93cc94
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions contracts/proxy/utils/Initializable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,16 @@ abstract contract Initializable {
// If the contract is initializing we ignore whether _initialized is set in order to support multiple
// inheritance patterns, but we only do this in the context of a constructor, and for the lowest level
// of initializers, because in other contexts the contract may have been reentered.

if (_initializing) {
require(
version == 1 && !Address.isContract(address(this)),
version == _initialized && !Address.isContract(address(this)),
"Initializable: contract is already initialized"
);
return false;
} else {
require(
_initialized < version || (version == 1 && !Address.isContract(address(this))),
_initialized < version || (version == _initialized && !Address.isContract(address(this))),
"Initializable: contract is already initialized"
);
_initialized = version;
Expand Down

0 comments on commit a93cc94

Please sign in to comment.