Skip to content

Commit

Permalink
Fix for crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine van der Lee committed Jan 17, 2017
1 parent 64e379d commit 8cb1f97
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ALDataRequestView.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "ALDataRequestView"
s.version = "2.2.2"
s.version = "2.2.3"
s.summary = "A view representation for data requests. Support for ReactiveCocoa and RXSwift."
s.description = "A view representation for data requests. Support for ReactiveCocoa and RXSwift by attached it to signalproducers and observables."
s.homepage = "https://github.com/AvdLee/ALDataRequestView"
Expand Down
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 2.2.3
- Fixed crash when retrying

# 2.2.2
- Fixed crash when retrying many times after each other

Expand Down
10 changes: 4 additions & 6 deletions Source/ALDataRequestView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,10 @@ public class ALDataRequestView: UIView {
return
}

if reloadView == nil {
if let dataSourceReloadView = dataSourceReloadType as? UIView {
reloadView = dataSourceReloadView
} else if let dataSourceReloadViewController = dataSourceReloadType as? UIViewController {
reloadView = dataSourceReloadViewController.view
}
if let dataSourceReloadView = dataSourceReloadType as? UIView {
reloadView = dataSourceReloadView
} else if let dataSourceReloadViewController = dataSourceReloadType as? UIViewController {
reloadView = dataSourceReloadViewController.view
}

guard let reloadView = reloadView else {
Expand Down

0 comments on commit 8cb1f97

Please sign in to comment.