Fix Custom option not disabled when URL with profile

Getting value of 'profile' ele no longer works (?), replace with proper
check if profile name is custom.
This commit is contained in:
Norbert Renner 2019-11-29 12:15:23 +01:00
parent 09a185c859
commit a70cf43838
2 changed files with 9 additions and 7 deletions

View file

@ -58,11 +58,9 @@ BR.RoutingOptions = L.Evented.extend({
$('.selectpicker').selectpicker('val', values);
this.refreshUI();
if (options.profile) {
// profile got not selected = not in option values -> custom profile passed with permalink
if (L.DomUtil.get('profile').value != options.profile) {
this.setCustomProfile(options.profile, true);
}
if (options.profile && L.BRouter.isCustomProfile(options.profile)) {
// custom profile passed with permalink
this.setCustomProfile(options.profile, true);
}
},