Skip to content

Commit 3cf59ca

Browse files
committed
fixed issue default hub not appearing on root path
1 parent a0f72b7 commit 3cf59ca

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

grails-app/services/au/org/ala/biocollect/merit/SettingService.groovy

+1-7
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,11 @@ class SettingService {
4444
def loadHubConfig(hub) {
4545

4646
if (!hub) {
47-
// assign hub using the logic
48-
// 1. Use previous hub from cookie.
49-
// 2. Otherwise, use default hub setting.
47+
hub = grailsApplication.config.app.default.hub?:'default'
5048
String previousHub = cookieService.getCookie(LAST_ACCESSED_HUB)
5149
if (!previousHub) {
52-
hub = grailsApplication.config.app.default.hub?:'default'
5350
cookieService.setCookie(LAST_ACCESSED_HUB, hub, -1 /* -1 means the cookie expires when the browser is closed */)
5451
}
55-
else {
56-
hub = previousHub
57-
}
5852
}
5953
else {
6054
// Hub value in multiple places like url path and in parameter causes Array to be passed instead of String.

0 commit comments

Comments
 (0)