Skip to content

Commit

Permalink
transform NavigableMap for map using toFlatConfig method (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
ltamaster authored Feb 2, 2022
1 parent a11c5ea commit 7916072
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class AssetPipelineGrailsPlugin extends grails.plugins.Plugin {
}


AssetPipelineConfigHolder.config = assetsConfig
AssetPipelineConfigHolder.config = assetsConfig.toFlatConfig()
if (BuildSettings.TARGET_DIR) {
AssetPipelineConfigHolder.config.cacheLocation = new File((File) BuildSettings.TARGET_DIR, ".assetcache").canonicalPath
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package asset.pipeline.grails
import asset.pipeline.AssetHelper
import grails.core.GrailsApplication
import grails.util.Environment
import org.grails.config.NavigableMap

import javax.annotation.Resource
import javax.servlet.http.HttpServletRequest
Expand Down Expand Up @@ -109,8 +110,9 @@ class AssetProcessorService {
}


String assetBaseUrl(final HttpServletRequest req, final UrlBase urlBase, final Map conf = grailsApplication.config.getProperty('grails.assets',Map,[:])) {
final String url = getConfigBaseUrl(req, conf)
String assetBaseUrl(final HttpServletRequest req, final UrlBase urlBase, final NavigableMap conf = grailsApplication.config.getProperty('grails.assets',Map,[:])) {
Map map = conf.toFlatConfig()
final String url = getConfigBaseUrl(req, map)
if (url) {
return url
}
Expand Down

0 comments on commit 7916072

Please sign in to comment.