]> khamidou — GitHub mirrors - electron.git/commitdiff
Fix a wrong check in emitting 'activate-with-no-open-windows' event.
authorHaojian Wu <hokein.wu@gmail.com>
Wed, 16 Sep 2015 00:36:01 +0000 (08:36 +0800)
committerHaojian Wu <hokein.wu@gmail.com>
Wed, 16 Sep 2015 00:36:01 +0000 (08:36 +0800)
atom/browser/api/lib/app.coffee

index d1dc3fc68962b304691e38593ccc6bbf493e0a03..f5b137eb0bb26e227539c88e649f59a16e9c1daa 100644 (file)
@@ -45,7 +45,7 @@ app.getHomeDir = -> @getPath 'home'
 app.getDataPath = -> @getPath 'userData'
 app.setDataPath = (path) -> @setPath 'userData', path
 app.resolveProxy = -> @defaultSession.resolveProxy.apply @defaultSession, arguments
-app.on 'activate', (event, hasVisibleWindows) -> @emit 'activate-with-no-open-windows' if hasVisibleWindows
+app.on 'activate', (event, hasVisibleWindows) -> @emit 'activate-with-no-open-windows' if not hasVisibleWindows
 
 # Session wrapper.
 sessionBindings._setWrapSession wrapSession