Skip to content

Commit

Permalink
fixed hash navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
mose committed Mar 1, 2016
1 parent 540691b commit 3f16e1e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/public/js/farms.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ ready( () => {
});

update_footer('/v1/' + base + '/farms');
restore_url(Farm, farms);
restore_url(farms, Farm);

});
2 changes: 1 addition & 1 deletion app/public/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function restore_url(list, someclass) {
var target = window.location.hash.replace(/#/,'');
var parts = target.split('/');
Array.prototype.forEach.call(list, (item, i) => {
if (item.textContent === parts[0]) {
if (item.textContent.split(' ')[0] === parts[0]) {
if (parts[1] !== undefined) {
someclass[parts[1]](parts[0]);
} else {
Expand Down
2 changes: 1 addition & 1 deletion app/public/js/nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,6 @@ ready( () => {
});

update_footer('/v1/' + base + '/nodes');
restore_url(Node, nodes);
restore_url(nodes, Node);

});

0 comments on commit 3f16e1e

Please sign in to comment.