Skip to content
This repository was archived by the owner on Nov 23, 2020. It is now read-only.

Commit c9d79f8

Browse files
committed
prevent crash
2 parents 38e3113 + dd5538d commit c9d79f8

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

ios/RNPopoverHostView.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,13 @@ - (void)presentViewController {
174174
parent = popoverHostView.popoverHostViewController;
175175
}
176176

177+
if (parent.presentedViewController) {
178+
if (_onHide) {
179+
_onHide(nil);
180+
}
181+
return;
182+
}
183+
177184
[_delegate presentPopoverHostView:popoverHostView
178185
withViewController:_popoverHostViewController
179186
parentViewController:parent

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-popover-ios",
3-
"version": "0.2.12",
3+
"version": "0.3.11",
44
"description": "A native popover component for react-native, iOS only.",
55
"main": "index.js",
66
"scripts": {

RNPopover.podspec renamed to react-native-popover-ios.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ require "json"
22
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
33

44
Pod::Spec.new do |s|
5-
s.name = "RNPopover"
5+
s.name = "react-native-popover-ios"
66
s.version = package['version']
77
s.summary = package['description']
88
s.author = package['author']
@@ -13,4 +13,4 @@ Pod::Spec.new do |s|
1313
s.source = { :git => "https://github.com/shimohq/react-native-popover-ios.git", :tag => "v#{s.version}" }
1414
s.source_files = "ios/*.{h,m}"
1515
s.dependency "React"
16-
end
16+
end

0 commit comments

Comments
 (0)