diff --git a/contracts/facets/DiamondCutFacet.sol b/contracts/facets/DiamondCutFacet.sol index 4e5fab7..4d1551f 100644 --- a/contracts/facets/DiamondCutFacet.sol +++ b/contracts/facets/DiamondCutFacet.sol @@ -27,7 +27,6 @@ contract DiamondCutFacet is IDiamondCut { ) external override { LibDiamondStorage.DiamondStorage storage ds = LibDiamondStorage.diamondStorage(); require(msg.sender == ds.contractOwner, "DiamondCutFacet: Must own the contract"); - require(_diamondCut.length > 0, "DiamondCutFacet: No facets to cut"); for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) { LibDiamondCut.addReplaceRemoveFacetSelectors( _diamondCut[facetIndex].facetAddress, diff --git a/contracts/libraries/LibDiamondCut.sol b/contracts/libraries/LibDiamondCut.sol index 546814d..4551be4 100644 --- a/contracts/libraries/LibDiamondCut.sol +++ b/contracts/libraries/LibDiamondCut.sol @@ -24,8 +24,7 @@ library LibDiamondCut { IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata - ) internal { - require(_diamondCut.length > 0, "LibDiamondCut: No facets to cut"); + ) internal { for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) { addReplaceRemoveFacetSelectors( _diamondCut[facetIndex].facetAddress,