Permalink
Browse files

+ only save ?q=query if there is actually a query!

  • Loading branch information...
1 parent 30282eb commit 16f053111ef17e57673d8fe799ca2ed384d18783 @floere committed Mar 4, 2012

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

Oops, something went wrong.
Binary file not shown.
@@ -45,7 +45,12 @@ var PickyController = function(config) {
// Note: If this query is the same as the last, we do not save it in the history.
//
if (query != lastFullQuery()) { // TODO Not full.
- var url = "?q=" + escape(query).replace(/\*/g,'%2A');
+ var url;
+ if (query == '') {
+ url = '';
+ } else {
+ url = "?q=" + escape(query).replace(/\*/g,'%2A');
+ }
window.History && window.History.getState() && window.History.pushState && window.History.pushState(null, null, url);
}
}
@@ -45,7 +45,12 @@ var PickyController = function(config) {
// Note: If this query is the same as the last, we do not save it in the history.
//
if (query != lastFullQuery()) { // TODO Not full.
- var url = "?q=" + escape(query).replace(/\*/g,'%2A');
+ var url;
+ if (query == '') {
+ url = '';
+ } else {
+ url = "?q=" + escape(query).replace(/\*/g,'%2A');
+ }
window.History && window.History.getState() && window.History.pushState && window.History.pushState(null, null, url);
}
}

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

Oops, something went wrong.

0 comments on commit 16f0531

Please sign in to comment.