Polygerrit: Fix redirection

Check for the data.hash having a value, rather than being not null.

If the value is "" the check `!= null` passes, but then it tries
to redirect to the empty string.

Change-Id: I9c78d94fa3d6b450a5aa537f8205b6bf337652e6
This commit is contained in:
David Pursehouse 2016-01-08 18:37:18 +09:00 committed by Dave Borowitz
parent 09e1103dd7
commit 5c1caa4f62

View File

@ -34,7 +34,7 @@ window.addEventListener('WebComponentsReady', function() {
// Routes.
page('/', loadUser, function(data) {
// For backward compatibility with GWT links.
if (data.hash != null) {
if (data.hash) {
page.redirect(data.hash);
return;
}