Skip to content

Commit

Permalink
Merge pull request #144 from jbx-protocol/fix/empty-tiers-array
Browse files Browse the repository at this point in the history
fix: empty tiers array should be length 0
  • Loading branch information
mejango authored Dec 7, 2023
2 parents 6897119 + 5292c64 commit c17f8de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contracts/JBTiered721DelegateStore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ contract JBTiered721DelegateStore is IJBTiered721DelegateStore {
// Keep a reference to the last tier ID.
uint256 _lastTierId = _lastSortedTierIdOf(_nft);

// Retuen an empty array if there are no tiers.
if (_lastTierId == 0) return _tiers;

// Initialize an array with the appropriate length.
_tiers = new JB721Tier[](_size);

Expand Down

0 comments on commit c17f8de

Please sign in to comment.