Skip to content

Commit 90e3311

Browse files
committed
Fix dismissal of non MCEmojiPicker VCs
1 parent 220752c commit 90e3311

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/MCEmojiPicker/View/MCEmojiPickerRepresentableController.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ public struct MCEmojiPickerRepresentableController: UIViewControllerRepresentabl
123123
context.coordinator.addPickerDismissingObserver()
124124
representableController.present(emojiPicker, animated: true)
125125
case false:
126-
representableController.presentedViewController?.dismiss(animated: true)
126+
if representableController.presentedViewController is MCEmojiPickerViewController {
127+
representableController.presentedViewController?.dismiss(animated: true)
128+
}
127129
}
128130
}
129131
}

0 commit comments

Comments
 (0)