Skip to content

Commit

Permalink
fix: empty tiers array should be length 0
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-something committed Oct 27, 2023
1 parent 6897119 commit 5292c64
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 5292c64

Please sign in to comment.