Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Commit

Permalink
Add empty layoutAttribute when there are no items in a section (#117)
Browse files Browse the repository at this point in the history
This stops the index out of bounds exception
  • Loading branch information
christoff-1992 authored and zenangst committed Jul 25, 2019
1 parent 2ff1330 commit 12ca28c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Blueprints.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "Blueprints"
s.summary = "A collection of flow layouts that is meant to make your life easier."
s.version = "0.11.3"
s.version = "0.11.4"
s.homepage = "https://github.com/zenangst/Blueprints"
s.license = 'MIT'
s.author = { "Christoffer Winterkvist" => "[email protected]" }
Expand Down
1 change: 1 addition & 0 deletions Sources/Shared/Core/HorizontalBlueprintLayout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
for section in 0..<numberOfSections {
widthOfSection = 0
guard numberOfItemsInSection(section) > 0 else {
layoutAttributes.append([])
continue
}

Expand Down
1 change: 1 addition & 0 deletions Sources/Shared/Core/VerticalBlueprintLayout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@

for section in 0..<numberOfSections {
guard numberOfItemsInSection(section) > 0 else {
layoutAttributes.append([])
continue
}

Expand Down

0 comments on commit 12ca28c

Please sign in to comment.