Skip to content

Commit

Permalink
Don't notify about project when there are none
Browse files Browse the repository at this point in the history
Fixes #38
  • Loading branch information
kimroen committed Apr 11, 2015
1 parent c40044d commit aa6ba6c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Ember Hearth/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ class AppDelegate: NSObject, NSApplicationDelegate, ProjectNameWindowDelegate {
var projects: [Project]?
var activeProject: Project? {
didSet {
NSNotificationCenter.defaultCenter().postNotificationName("activeProjectSet", object: activeProject)
if activeProject != nil {
NSNotificationCenter.defaultCenter().postNotificationName("activeProjectSet", object: activeProject)
}
toggleProjectMenus()
}
}
Expand Down

0 comments on commit aa6ba6c

Please sign in to comment.