Treat handle() as a method of routes object
authorSteven Chan <steven3416@gmail.com>
Wed, 3 Sep 2014 19:44:22 +0000 (12:44 -0700)
committerSteven Chan <steven3416@gmail.com>
Wed, 3 Sep 2014 19:46:10 +0000 (12:46 -0700)
src/overdrive.coffee

index 273ae9b..68d945d 100644 (file)
@@ -83,7 +83,7 @@ require [
                # list of results for each handler that was executed. A result is
                # undefined if no subscriptions to an OD service was needed.
                handle: (p = window.location.pathname) ->
-                       for n, v of routes when n isnt 'handle'
+                       for own n, v of @ when n isnt 'handle'
                                v() if (new RegExp n).test p
 
                'eg\/opac': ->