Permalink
Browse files

oldRedirects unravelled in right order

  • Loading branch information...
1 parent 5ff6107 commit 55226b24415c86def490da4ce632cc856d1430bc Jason King committed Aug 17, 2012
Showing with 13 additions and 10 deletions.
  1. +5 −4 lib/batman.js
  2. +5 −4 lib/dist/batman.node.js
  3. +3 −2 src/controller/controller.coffee
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -45,6 +45,7 @@ class Batman.Controller extends Batman.Object
constructor: ->
super
@_resetActionFrames()
+ @_oldRedirect = []
renderCache: new Batman.RenderCache
defaultRenderYield: 'main'
@@ -79,12 +80,12 @@ class Batman.Controller extends Batman.Object
frame = new Batman.ControllerActionFrame {parentFrame, action}, =>
@_runFilters action, params, 'afterFilters'
@_resetActionFrames()
- Batman.navigator?.redirect = oldRedirect
+ Batman.navigator?.redirect = @_oldRedirect.pop()
@_actionFrames.push frame
frame.startOperation({internal: true})
- oldRedirect = Batman.navigator?.redirect
+ @_oldRedirect.push Batman.navigator?.redirect
Batman.navigator?.redirect = @redirect
@_runFilters action, params, 'beforeFilters'

0 comments on commit 55226b2

Please sign in to comment.