From: Cheng Zhao Date: Thu, 30 Jul 2015 02:31:49 +0000 (+0800) Subject: Coffeescript declares variable before assigning it X-Git-Tag: v0.30.2~3 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=2d5c0ac9eebb5bf37de1dcb3375511d6dd6afbab;p=electron.git Coffeescript declares variable before assigning it --- diff --git a/atom/common/api/lib/callbacks-registry.coffee b/atom/common/api/lib/callbacks-registry.coffee index 4999e19d..8f5eb629 100644 --- a/atom/common/api/lib/callbacks-registry.coffee +++ b/atom/common/api/lib/callbacks-registry.coffee @@ -1,4 +1,4 @@ -global = global # the "global.global" might be deleted later +savedGlobal = global # the "global.global" might be deleted later module.exports = class CallbacksRegistry @@ -18,10 +18,10 @@ class CallbacksRegistry @callbacks[id] ? -> call: (id, args...) -> - @get(id).call global, args... + @get(id).call savedGlobal, args... apply: (id, args...) -> - @get(id).apply global, args... + @get(id).apply savedGlobal, args... remove: (id) -> delete @callbacks[id]