]> khamidou — GitHub mirrors - electron.git/commitdiff
Coffeescript declares variable before assigning it
authorCheng Zhao <zcbenz@gmail.com>
Thu, 30 Jul 2015 02:31:49 +0000 (10:31 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 30 Jul 2015 02:31:49 +0000 (10:31 +0800)
atom/common/api/lib/callbacks-registry.coffee

index 4999e19dc119cc153f86155342927c8e8a2b3544..8f5eb62916c0e08fac51ebdb42da0a98a5030f9a 100644 (file)
@@ -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]