Skip to content

Commit

Permalink
dont redirect empty queries (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgravois committed Apr 12, 2017
1 parent c4642a9 commit 1e9d097
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/assets/js/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ function redirectIfQuery() {
redirected = false;

delimiterPosition = pageName.indexOf('#');
if (delimiterPosition > 0) {

// if a hashed query is passed and cant be matched with our list of valid topics, redirect a canned github search
if (pageName.length - 1 > delimiterPosition) {
for (i=1; i < topicList.length; i++) {
if (pageName.substr(delimiterPosition + 1) === topicList[i].innerHTML) {
return redirected;
Expand Down

0 comments on commit 1e9d097

Please sign in to comment.