mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-204: If is not a function; fix style around location redirect
This commit is contained in:
committed by
Nick Couchman
parent
c591a58f93
commit
48baa5211e
@@ -42,10 +42,10 @@ angular.module('index').config(['$routeProvider',
|
|||||||
var curPath = window.location.href;
|
var curPath = window.location.href;
|
||||||
var ticketPos = curPath.indexOf("?ticket=") + 8;
|
var ticketPos = curPath.indexOf("?ticket=") + 8;
|
||||||
var hashPos = curPath.indexOf("#/");
|
var hashPos = curPath.indexOf("#/");
|
||||||
if(ticketPos > 0 && ticketPos < hashPos) {
|
if (ticketPos > 0 && ticketPos < hashPos) {
|
||||||
var ticket = curPath.substring(ticketPos, hashPos);
|
var ticket = curPath.substring(ticketPos, hashPos);
|
||||||
var newPath = curPath.substring(0,ticketPos - 8) + '#/?ticket=' + ticket;
|
var newPath = curPath.substring(0,ticketPos - 8) + '#/?ticket=' + ticket;
|
||||||
window.location=newPath;
|
window.location = newPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
}]);
|
}]);
|
||||||
|
Reference in New Issue
Block a user