Skip to content

Commit

Permalink
removed number of facets check
Browse files Browse the repository at this point in the history
  • Loading branch information
mudgen committed Sep 29, 2020
1 parent 7fa2351 commit ef83021
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion contracts/facets/DiamondCutFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions contracts/libraries/LibDiamondCut.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ef83021

Please sign in to comment.