Optimize condition in _disableInitializers (#3787)
This commit is contained in:
committed by
GitHub
parent
d5ca39e9a2
commit
88a3f95715
@ -143,7 +143,7 @@ abstract contract Initializable {
|
||||
*/
|
||||
function _disableInitializers() internal virtual {
|
||||
require(!_initializing, "Initializable: contract is initializing");
|
||||
if (_initialized < type(uint8).max) {
|
||||
if (_initialized != type(uint8).max) {
|
||||
_initialized = type(uint8).max;
|
||||
emit Initialized(type(uint8).max);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user