Commit 7bde5c6050939f3226336990908ac0f987f0c251
1 parent
8be3af3e
Exists in
master
and in
10 other branches
Fix #65 - Voltar a tela do programa, quando estiver em 'sobre-o-programa' (2)
Showing
1 changed file
with
3 additions
and
2 deletions
Show diff stats
js/main.js
... | ... | @@ -89,13 +89,14 @@ $.getJSON(noosferoAPI) |
89 | 89 | $( '.proposal-category .go-back' ).click(function(event){ |
90 | 90 | event.preventDefault(); |
91 | 91 | |
92 | + var oldHash = window.location.hash; | |
92 | 93 | var regexSubpages = /sobre-o-programa$/; |
93 | - var isSubpage = regexSubpages.exec(hash) !== null; | |
94 | + var isSubpage = regexSubpages.exec(oldHash) !== null; | |
94 | 95 | var newHash = '#/temas'; // default page |
95 | 96 | |
96 | 97 | if(isSubpage){ |
97 | 98 | // return to proposal page |
98 | - newHash = window.location.hash.split('/sobre-o-programa')[0]; | |
99 | + newHash = oldHash.split('/sobre-o-programa')[0]; | |
99 | 100 | } |
100 | 101 | |
101 | 102 | // Update URL and Navigate | ... | ... |