[desktop] fix bug 61144

This commit is contained in:
maxkadushkin
2023-02-12 19:40:56 +03:00
parent ce7c49e815
commit 96e6764fbe

View File

@ -261,18 +261,24 @@ define([
if ( me.helpUrl() ) {
fetch(build_url(me.helpUrl(), Common.Locale.getDefaultLanguage(), '/Contents.json'))
.then(function (response) {
if ( response.ok ) {
/* remote help avail */
fetch(build_url(me.helpUrl(), Common.Locale.getCurrentLanguage(), '/Contents.json'))
.then(function (response) {
if ( response.ok ) {
helpUrl = build_url(me.helpUrl(), Common.Locale.getCurrentLanguage(), '');
}
})
.catch(function (e) {
helpUrl = build_url(me.helpUrl(), Common.Locale.getDefaultLanguage(), '');
});
}
// if ( response.ok )
return response.json();
})
.then(function (text) {
/* remote help avail */
fetch(build_url(me.helpUrl(), Common.Locale.getCurrentLanguage(), '/Contents.json'))
.then(function (response) {
// if ( response.ok )
return response.json();
})
.then(function (t) {
helpUrl = build_url(me.helpUrl(), Common.Locale.getCurrentLanguage(), '');
})
.catch(function (e) {
helpUrl = build_url(me.helpUrl(), Common.Locale.getDefaultLanguage(), '');
});
})
.catch(function (e){
})
}
});