Add explicit returns to browser process classes

This commit is contained in:
Kevin Sawicki
2015-03-18 14:54:30 -07:00
parent b4f911f6d3
commit f728bc7aec
3 changed files with 6 additions and 2 deletions

View File

@@ -82,7 +82,8 @@ class ApplicationMenu
# window specific items.
enableWindowSpecificItems: (enable) ->
for item in @flattenMenuItems(@menu)
item.enabled = enable if item.metadata?['windowSpecific']
item.enabled = enable if item.metadata?.windowSpecific
return
# Replaces VERSION with the current version.
substituteVersion: (template) ->
@@ -145,7 +146,7 @@ class ApplicationMenu
if item.command
item.accelerator = @acceleratorForCommand(item.command, keystrokesByCommand)
item.click = -> global.atomApplication.sendCommand(item.command)
item.metadata['windowSpecific'] = true unless /^application:/.test(item.command)
item.metadata.windowSpecific = true unless /^application:/.test(item.command)
@translateTemplate(item.submenu, keystrokesByCommand) if item.submenu
template

View File

@@ -388,11 +388,13 @@ class AtomApplication
# Kill all processes associated with opened windows.
killAllProcesses: ->
@killProcess(pid) for pid of @pidsToOpenWindows
return
# Kill process associated with the given opened window.
killProcessForWindow: (openedWindow) ->
for pid, trackedWindow of @pidsToOpenWindows
@killProcess(pid) if trackedWindow is openedWindow
return
# Kill the process with the given pid.
killProcess: (pid) ->

View File

@@ -65,6 +65,7 @@ class AutoUpdateManager
return unless @releaseVersion?
for atomWindow in windows
atomWindow.sendMessage('update-available', {@releaseVersion})
return
setState: (state) ->
return if @state is state