Fix "data is undefined" JS error

Reported on 5.0.4, made the fix because it makes sense

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2021-04-20 23:27:38 +02:00
parent d3e03b6667
commit 622c91ca36
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -189,7 +189,7 @@ Navigation.loadChildNodes = function (isNode, $expandElem, callback) {
if (callback && typeof callback === 'function') {
callback(data);
}
} else if (data.redirect_flag === '1') {
} else if (typeof data !== 'undefined' && data.redirect_flag === '1') {
if (window.location.href.indexOf('?') === -1) {
window.location.href += '?session_expired=1';
} else {