Permalink
Browse files

support search path in push pop state

  • Loading branch information...
1 parent c86eddd commit 02aedf4099ee46f2530e222a7ad87bb237976f4e @nateps nateps committed Aug 13, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/History.js
View
@@ -7,7 +7,7 @@ var qs = require('qs')
, winHistory = win.history
, winLocation = win.location
, doc = win.document
- , currentPath = winLocation.pathname
+ , currentPath = winLocation.pathname + winLocation.search
// Replace the initial state with the current URL immediately,
// so that it will be rendered if the state is later popped
@@ -73,7 +73,7 @@ History.prototype = {
state.$render = true
state.$method = options.method
winHistory[historyMethod](state, null, url)
- currentPath = winLocation.pathname
+ currentPath = winLocation.pathname + winLocation.search
if (render) renderRoute(this.page, options, e)
}
}
@@ -172,7 +172,7 @@ function addListeners(history, page) {
var previous = currentPath
, state = e.state
, options
- currentPath = winLocation.pathname
+ currentPath = winLocation.pathname + winLocation.search
options = {
previous: previous

0 comments on commit 02aedf4

Please sign in to comment.