Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

Commit

Permalink
additional check when embedding
Browse files Browse the repository at this point in the history
  • Loading branch information
aradchenko committed Feb 20, 2017
1 parent 3906b9f commit 6219618
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Source/SideMenuController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ public extension SideMenuController {
*/
public func embed(centerViewController controller: UIViewController, cacheIdentifier: String? = nil) {

guard controller !== centerViewController else {
if sidePanelVisible {
animate(toReveal: false)
}

return
}

if let id = cacheIdentifier {
controllersCache[id] = controller
}
Expand Down

0 comments on commit 6219618

Please sign in to comment.