Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanzhelyazkov committed Aug 22, 2024
1 parent 7989e7e commit 88915fa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions contracts/utility/Upgradeable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,11 @@ abstract contract Upgradeable is IUpgradeable, AccessControlEnumerableUpgradeabl
*/
function postUpgrade(bytes calldata data) external {
uint16 initializations = _initializations + 1;
if (initializations < version()) {
initializations = version();
uint16 _version = version();
if (initializations < _version) {
initializations = _version;
}
if (initializations != version()) {
if (initializations != _version) {
revert AlreadyInitialized();
}

Expand Down

0 comments on commit 88915fa

Please sign in to comment.