Commit f35acfb3 authored by Leo Iannacone's avatar Leo Iannacone

redirect to hompage if hash is not set

parent db1b8d77
...@@ -6,9 +6,13 @@ socket.on('distributions', function(distributions) { ...@@ -6,9 +6,13 @@ socket.on('distributions', function(distributions) {
}); });
}); });
socket.on('error', function(data) { console.error(data) });
if (window.location.pathname == DISTRIBUTION_PAGE) { if (window.location.pathname == DISTRIBUTION_PAGE) {
function __check_hash_has_sense() { function __check_hash_has_sense() {
if (! window.location.hash)
window.location.pathname = '/'
info = window.location.hash.split('/') info = window.location.hash.split('/')
if (info.length == 2) if (info.length == 2)
window.location.hash = info[0] window.location.hash = info[0]
...@@ -44,5 +48,3 @@ if (window.location.pathname == DISTRIBUTION_PAGE) { ...@@ -44,5 +48,3 @@ if (window.location.pathname == DISTRIBUTION_PAGE) {
Page_Distrubion.update(old_data) Page_Distrubion.update(old_data)
}); });
} }
socket.on('error', function() { console.error(arguments) });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment