From 09a6e37a090c6035f085dd1a1227c5c257e8e93c Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 24 Jun 2015 12:01:19 +0800 Subject: [PATCH] Keep compatibility with app.resolveProxy --- atom/browser/api/lib/app.coffee | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/atom/browser/api/lib/app.coffee b/atom/browser/api/lib/app.coffee index aad56fd91238..a2ec8bd10c9f 100644 --- a/atom/browser/api/lib/app.coffee +++ b/atom/browser/api/lib/app.coffee @@ -26,12 +26,13 @@ if process.platform is 'darwin' setMenu: bindings.dockSetMenu # Be compatible with old API. -app.once 'ready', -> app.emit 'finish-launching' +app.once 'ready', -> @emit 'finish-launching' app.terminate = app.quit app.exit = process.exit -app.getHomeDir = -> app.getPath 'home' -app.getDataPath = -> app.getPath 'userData' -app.setDataPath = (path) -> app.setPath 'userData', path +app.getHomeDir = -> @getPath 'home' +app.getDataPath = -> @getPath 'userData' +app.setDataPath = (path) -> @setPath 'userData', path +app.resolveProxy = -> @defaultSession.resolveProxy.apply @defaultSession, arguments # Only one App object pemitted. module.exports = app