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

Commit

Permalink
Merge pull request teodorpatras#89 from eastsss/master
Browse files Browse the repository at this point in the history
additional check when embedding center view controller
  • Loading branch information
teodorpatras authored Mar 23, 2017
2 parents 3906b9f + 6219618 commit 9cc1899
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 9cc1899

Please sign in to comment.