     result
 
   onInvalidate: (f) ->
-    if not Tracker.active
-      throw new Error("Tracker.onInvalidate requires a currentComputation")
+    throw new Error "Tracker.onInvalidate requires a currentComputation" unless Tracker.active
 
     Tracker.currentComputation.onInvalidate(f)
 


  _compute: ->
    @invalidated = false
    @._func(@)

  _recompute: ->
    @_recomputing = true

    if @invalidated
      f()
    else
      @_onInvalidateCallbacks.push f

  invalidate: ->
    if not @invalidated
